The South seceded over a misguided attempt to preserve slavery.
The North went to war with the South for one simple reason: They were traitors to the flag.
The North did not take up arms to liberate black Americans, that’s for sure, but it’s not really right to say the Civil War *wasn’t* about slavery in some sense.
That would be to miss the entire history of North-South tensions of the 20-30 years prior to the Civil War including the tenuous compromises, Senate floor canings, bleeding Kansas, etc.