Abraham Lincoln’s election was the direct cause of secession and the Civil War. And that was because he opposed the extension of slavery in the territories / new states, which meant slavery was doomed.
So yes it was about slavery and it was brought to a head by the election of Lincoln.
What individual southerners fought for is another matter. Once the confederate states seceded the North was going to invade to preserve the union, meaning many indeed fight to resist what they viewed as northern aggression.
Most Southerners were glad there was ANY reason to shoot at Yankees with a GFE rifle and ammo. Slavery works as good as any.
Lee invaded the North twice.