The South Carolina Declaration of the Immediate Causes Which Induce and Justify the Secession of South Carolina from the Federal Union lays out all of the causes leading to the secession and ultimate formation of the CSA. It was the increasing attempts to free fugitive slaves, the decreased chances for slavery in the territories and ultimate fear that slavery would be abolished throughout the Union.
From the Declaration:
The ends for which the Constitution was framed are declared by itself to be "to form a more perfect union, establish justice, insure domestic tranquility, provide for the common defence, promote the general welfare, and secure the blessings of liberty to ourselves and our posterity."
These ends it endeavored to accomplish by a Federal Government, in which each State was recognized as an equal, and had separate control over its own institutions. The right of property in slaves was recognized by giving to free persons distinct political rights, by giving them the right to represent, and burthening them with direct taxes for three-fifths of their slaves; by authorizing the importation of slaves for twenty years; and by stipulating for the rendition of fugitives from labor.
We affirm that these ends for which this Government was instituted have been defeated, and the Government itself has been made destructive of them by the action of the non-slaveholding States. Those States have assume the right of deciding upon the propriety of our domestic institutions; and have denied the rights of property established in fifteen of the States and recognized by the Constitution; they have denounced as sinful the institution of slavery; they have permitted open establishment among them of societies, whose avowed object is to disturb the peace and to eloign the property of the citizens of other States. They have encouraged and assisted thousands of our slaves to leave their homes; and those who remain, have been incited by emissaries, books and pictures to servile insurrection.
For twenty-five years this agitation has been steadily increasing, until it has now secured to its aid the power of the common Government. Observing the forms of the Constitution, a sectional party has found within that Article establishing the Executive Department, the means of subverting the Constitution itself. A geographical line has been drawn across the Union, and all the States north of that line have united in the election of a man to the high office of President of the United States, whose opinions and purposes are hostile to slavery. He is to be entrusted with the administration of the common Government, because he has declared that that "Government cannot endure permanently half slave, half free," and that the public mind must rest in the belief that slavery is in the course of ultimate extinction.
This sectional combination for the submersion of the Constitution, has been aided in some of the States by elevating to citizenship, persons who, by the supreme law of the land, are incapable of becoming citizens; and their votes have been used to inaugurate a new policy, hostile to the South, and destructive of its beliefs and safety.
Many still believe that secession had to do with independence and freedom, but states joining the Confederacy had less freedom, and almost 50% of the population of the slave states had no freedom. One third of families in the slave states owned slaves, and no state in the Confederacy could opt out of slavery as a state.