It's a bit subject to interpretation. If you look at some of the texts of the time, you can find statements to the effect of the Confederacy established itself in order to preserve slavery. Some people have taken that to mean that it was all about slavery.
However I feel if you look at the prevailing economic differences of the time between the economies of the North and South and some of the actual issues (and political tensions), you can put those remarks into context and realize those people were truly trying to preserve their way of life and political ideology, and thought that the government had no business telling them otherwise. While I cannot condone slavery, the desire to not be subject to tyranny is very sympathetic to me.
And honestly, if you look at it in the context of the times, it's not like the North had anything to be proud of either. Ever see Gangs of New York? They had just as much racial discrimination and a huge underclass of laborers who really didn't have rights either. At least when slaves got too old to work, they were still fed and housed instead of just left on the streets.
Slaves were an economic investment to those people, so the beatings and whatnot that have become our popular conception of slavery in the US were relatively rare (but they did happen!). I'm not saying it was right or okay or that these people weren't abused and exploited, just that the picture we have of the situation is often skewed because people in general, not just black people, lived very poorly back then. There were plenty of white people in similar conditions who were only better off because they couldn't be sold or separated from their families, etc. Granted that's a meaningful improvement to your situation, but their quality of life was comparable.
But I feel import and export policies, economic policies which favored one part of the country over another, and the federal question were what it was really about. The fact slavery ended was only incidental. Lincoln was scum but he was a very shrewd man. He knew the best way to immediately bolster his career and support while squashing his enemies was to free the slaves. He didn't care about doing it because it was right, he did it because it was good for Lincoln.
I honestly feel if it hadn't happened then, it would have happened sooner than later anyway. Just as today, the libertarians of Lincoln's time were a small and derided but vocal minority who persisted in their efforts. The public opinion, the stance of the average person, was slowly shifting more and more that way any how. If nothing else technology would have made slavery pointless at some point in time, and it would have ended then. I do feel however that since it happened that way, it set us well ahead all at once.
Honestly though, if I had to pick a side that I was more sympathetic to, it would be the South, and not because I think they were the "good" guys, but because they were doing something that's as American as you can get. I keep a rebel flag around as a concrete reminder of their devotion to what they believed in, you have to admire that. I also believe they saw the writing on the wall for what the US government would become. But if they had won, there's no guarantee things would be any better and in fact they could even be considerably worse.