It was middway through the war when it became about Slavery. Lincoln abolished it as a last resort because the confederates were literally about to win the war. It wasn't about slavery at first - it eventually esculated to be about that though.
Oh it was more complex, really it was started over... taxes. The North was expanding, the South wasn't. This made Southerners angry because they felt they were over taxed but not getting the expansion they wanted. So the broke off and formed the Confederacy. Key fact here, the North had slaves also at the time. Not as many as in the south, but they had them.