rpm was right mostly in saying it was a war over economics. But you could just as easily say it was a war about power, and who had it (or didnt). If you look at the years leading up to the Civil War, in the early 1800s slavery was dying out all on its own. But then prices started to recover on Cotton. Soon prices were higher than they had ever been, and southern plantations couldnt produce it in enough quantity to glut the market. There was a renewed demand for slaves, but no way to get new ones. Slave owners were allowed to keep the slaves they had, and children of those slaves, but they couldnt bring them in from outside (not legally). The African slave trade was outlawed. Some still made the run, and risked being caught. But those numbers that actually made it through were relatively few. Abolitionists in free states made the issue worse by flaunting the fact when an escaped slave made the border. They hid them from collection agents, even from federal agents. When the new territories in the west started to open up, decisions over whether they would be free or slave states didnt just divide the country, it got downright ugly. Southerners were so desperate to expand their pool of slaves, they made several attempts at taking over Cuba, and even tried establishing themselves through a coup in South America. As the 1850s ground on, it became more and more apparent that they were going to get the short end of the stick in the new territories in the West, and the way they saw things, Federal laws favored the more industrialized northern states that didnt rely on slave labor for their economy. Add to that the fact that American farm produce was more in demand than ever, and money was to be made if only enough could be produced. The Crimean War in the mid '50s left Europe without a grain supply from Russia, and America was filling that void. Banks and stocks and bonds and such doubled in number. California's gold strikes were pumping millions of dollars into the economy. All of these were seen to put money in the hands of the northern states, while the South's chance for economic boom was being deliberately downplayed. Western lands were being opened to settlement, and the people were not necessarily open to slavery. Those lands were supplying much in the way of needed agricultural products, further spreading the wealth and reducing the chances for the South.
Brown's revolt at Harper's Ferry in 1859 set a spark to something that had been piling up for a long time. It smoldered until the political conventions of 1860. Stephen Douglas had been a dividing point for Democrats for years, and this was the one that broke all the straws. With the south asking for a platform that would mandate federal protection for slavery (not just legal protection), and the northern Democrats refusing to back down, the party was divided forever and the southerners left the convention. Meanwhile, the Republicans had no problem nominating Lincoln (an avowed anti-slavery advocate, although moderate in his politics). He united a large part of the new Republican party with some of what remained of the old Whig party. The remainder of them (the Southern ones) were pro-slavery but still not ready to join Southern Democrats. As a result of the hotheaded politics, we had a 4 way electios in 1860. Lincoln vs Douglas vs Bell vs Breckenridge. Lincoln and Douglas were seen as the "Northern" candidates, and both equally hated in the South. I think we know who won. Bitterness and anger over the elections that year took that smoldering spark and fanned it into the flames of secession.
The Confederate States of America organized itself, set up shop, and drafted a constitution within 3 months of Lincoln's election. On Dec. 20th 1860, S. Carolina's legislature voted 169 to 0 to secede from the Union. Mississippi joined on Jan. 9th 1861, Florida on Jan. 10th, Alabama on Jan. 11th, Georgia on Jan. 19th, Louisiana on Jan. 26th and Texas on Feb. 1st. After the fall of Ft. Sumter they were joined by Virginia, Arkansas, N. Carolina, and Tennessee.