Slavery was the cause of the civil war, because the Northern side did not believe that enslaving people for work with no pay was wrong, while the Southernors believed that it was in their right that they can own slaves & use them in whatever way they wanted to.
In this disagreement they started a war (along with other factors)