I would also add that the early nineteenth century witnessed a decline in tobacco cultivation in the Chesapeake for a variety of reasons, including soil depletion and falling prices. Many planters did turn to cotton, especially in places like Southside Virginia, but as the previous response implies, many turned to less labor-intensive crops like grains, which led to a labor surplus. White anxieties about large populations of black slaves (especially after the Nat Turner rising), as well as the voracious demand for slaves in the new Southwest, created strong cultural and economic motives for the sale of slaves to the lower South, and the decline of the institution, in the Upper South.
Slavery declined in the Upper South mainly due to cotton. First, that region was not good for growing cotton. As cotton became "king," that region could not keep up and therefore needed fewer slaves. At the same time, slaveowners in that area could make more money selling their slaves to the cotton areas of the Deep South than by keeping them. This also helped lead to the decline in slavery.