That's a pretty intense oversimplification of things.
Certainly, slavery was one of the bones of contention* that led to the formation of the Confederacy. But more than anything, it was a matter of States Rights vs Federal Rights. Broadly speaking, the Southern States felt that when it came to an issue of Federal Law saying one thing and State Law saying another, the State Law should take precedence and most especially, that Federal Law shouldn't be able to interfere in matters internal to the State itself. The Northern States, naturally, disagreed.
The matter of western expansion was another major issue because both North and South wanted the new western states to follow their particular party lines to strengthen their positions. It came to a head when Lincoln** won the presidency without a single Southern electoral vote. The Southern States, feeling excluded from the broader political systems, soon seceded from the Union and the Civil War followed.
*In general, it was more the political and economic ramifications of the Northern States being able to go in and abolish slavery than the moral and ethical ones that had the South up in arms.
**Lincoln was a noted anti-slavery politician, but also a moderate accused of not being abolitionist enough.