How did the cotton gin lead to a rise in slavery?
Cotton was suddenly more profitable, and the planters who grew it could suddenly afford more slaves.
Before the cotton gin, growing cotton was a break-even proposition at best. Separating cotton from its seed was generally done with a knife, a very slow and dangerous process. One slave could, at peak efficiency, produce one bag of cotton a day.
Although slaves were not paid, they cost money in other ways. Purchasing a slave was a major investment and feeding him/her was a fixed operating cost. One bag of cotton a day was not a good return on those investments. But if a small, hand-cranked cotton gin were used, that one bag of cotton suddenly became five bags per worker. With a large cotton gin, or several such devices, those five bags became twenty.
Cotton gins made cotton insanely profitable overnight. A serious operation would buy several of them and require more workers to operate them. As cotton only grew in the deep south, those workers were most often slaves. As indefensible as slavery was on moral grounds, for the first half of the 19th century, it was certainly profitable.
The cotton gin made growing short staple cotton profitable which could be grown in many more places than long staple cotton.
Long staple cotton could be grown only is parts of six states. The climate and soil conditions that made growing long staple cotton possible were restricted.
Long staple cotton was profitable because the cotton fibers could be easily separated from the seeds. While short staple cotton was not profitable because separating the cotton fibers from seed was very difficult and time consuming.
After the cotton gin was invented short staple cotton could be profitably grown because the gin separated the fibers from the seeds with little time or effort. Short staple cotton could be grown through out the south. Slave plantation sprang up in Georgia, Mississippi, Alabama, sections of South and North Carolina that could not grow long staple cotton.
While reducing the number of slaves needed to grow cotton the cotton gin greatly increased the areas where cotton could be profitably grown. This increased the demand for slaves.