The idea that states might secede from the Union over the issue of slavery in America did not originate in the South. In fact, it was a position adopted by abolitionists in the 1840s, who suggested that the North should itself secede to free itself from the proslavery United States Constitution.
However, the appeal of secession grew as the cycle of conflicts grew more intense in the 1850's. "Compromises" that gave the South much of what it wanted turned out to be ephemeral, but they provoked greater and more strident opposition in the North. In the South, the view that there was no long term safety within the Union for their "peculiar institution" of slavery grew in direct proportion.
Edmund Ruffin was a Virginia planter and advocate of slavery, widely believed to have fired the first shot during the assault on Fort Sumter. He published a series of articles in late 1857 entitled "Consequences of Abolition Agitation." The following is a selection from one of them:
If when the Missouri Compromise was submitted to, the proposed restrictions had been resisted by the south at all hazards, there would have been no further trouble about slavery. And if the fanaticism (or more truly, the unholy grasping for political power) of the North had then been so unyielding as to permit a separation of the United States, the Southern portion would now have double of their present wealth and power -- and the Northern states would not have attained half of their present greatness and wealth, which been built upon the tribute exacted from the South by legislative policy. But no separation would have been produced.
As the election of 1860 approached, the voters were offered four choices, none strong enough to receive a majority of the popular vote, but the Republican Party candidate Abraham Lincoln had a plurality of the popular vote and a majority in the electoral college. Despite his repeated assurance that Republican held no designs on the institution of slavery in southern states, just the territories and the North, Southerners who had read his "House Divided" speech at Cooper Union may have reasonably doubted that this attitude would prevail for long. Secession seemed the logical choice.
South Carolina went first, with a certain bravado, before the end of the year. Other Southern states soon followed, with varying degrees of debate. Georgia had lively debate in its legislature in November, with Robert Toombs representing the case for immediate secession and Alexander Stephens putting forward the case for delay. Georgia did not secede immediately, but by February it was one of the seven seceding states.
The formation of the Confederacy took place in Montgomery. Delegates from the seven states adopted a constitution which was remarkably close to the United States Constitution, nearly word-for-word in some instances. As president, the delegates elected Jefferson Davis of Mississippi, a man with a long record of involvement with the federal government. To fill the position of vice-president, they chose the same Alexander Stephens who had urged Georgia to delay until after Lincoln's inauguration.
The CSA quickly began to take over lightly defended federal positions throughout its territory and acquired arms and ammunition from federal armories. The process was facilitated by the fact that the Secretary of War was a slaveholder from Virginia, but given the realities of the situation, the federals couldn't have done much else. More heavily fortified positions, like Fort Sumter in Charleston harbor, could not be taken without a fight. President Buchanan, otherwise unresisting, would not yield Fort Sumter and attempted to reinforce it.