One reason the slavery issue came up, was that it was competition against the North for business. The South was just plain outproducing the North by quite a bit because slaves were completely faster at picking than any machine at that time. This made the business leaders in the North lose out by quite alot.
The business leaders pressed and lobbied the politicians to outlaw slavery, put tariffs on the South's imports, and many more unfair things done to the people in the south.
The Southerners were just plainly getting crapped on because of some greedy Yankees who needed more money. This issue would probably not have blown out in a total war if the South would have not been willing to kill for their rights, but they split off in their own country, and federal law states that no state or states can just leave the U.S. any time they want. So, naturally the union goes down and starts battling the Confederates. Meanwhile to justify the war, Lincoln signs the Emancipation Proclamation, to free the slaves. What they don't tell you is that the Emancipation Proclamation freed slaves "only in the south." The "South" considered themselves their own country at that time, so naturally they ignored the U.S.'s laws because it wasn't theirs.
Long story short, the Union beat the Confederates and the Union made a big deal about slavery and how the war was all about freeing the slaves in order to make themselves look good.