Oddly enough, it was the South’s efforts to maintain and to spread slavery that contributed the most to its abolition. Had the Civil War not happened, it is very unlikely that any immediate emancipation would have happened. It is more likely that slavery would have continued until it died “naturally” the way it did in England earlier and in Brazil later than in the US.
Before the war, abolitionist sentiment in the United States was not very strong at all. There was a great deal of “free soil” sentiment because white Northerners did not want to have to compete for land and for profit in the West with enterprises that used slave labor. Northerners wanted to prevent slavery from spreading so that white individuals could use the West as a place to make a better life for themselves as individuals. But this is by no means the same thing as abolitionism. Not even President Lincoln really intended to abolish slavery before the war.
Therefore, it was the war that played the biggest role in ending slavery. It made clear that the US could not continue half-slave and half-free. Once the North won the war, there was no doubt that slavery would have to be abolished. The South, in pushing to extend slavery, actually brought about its demise.