Skallagrim
Banned
You are partly right about the motivation of the North. The South seceded and fought for the continuation of Slavery, that can't be denied. Any denial is part of the lost cause myth. The North initialy motivated it's fight as a fight against secession, but as the South fought for slavery, it is inevitable that this issue becomes part of the war goals of the North. One major factor here is the runaway slaves in occupied country. Grant f.i. got so many of those in his camp when he pushed South, that he wrote several requests to the president and the Capitol to solve this issue. This certainly influenced the politicians to come to a quick answer to this question. My point is, any occupation of southern territory leads to more slave refugees. This will lead to an urge to solve the problem. And the only acceptable solution for the North here is abolition. That will come quicker if more territory is occupied.
Regarding motivation of both sides, I am quite convinced that "maintain the Union" was paramount to the North to rouhly the same overwhelming degree as "preserve slavery" was for the South. And on the flip-side, that "end slavery" was (at least initially) as central to the North as "defend states' rights (other than slavery)" was to the South-- that is, it was mostly an appealing bit of side-dressing that did not feature into the real decision-making in any important way.
That said, ending slavery did become more important to the North during the war. For the reason you mention (practical reality on the ground) but also because -- even though it wasn't initially of true importance to the political decision-makers -- most Northerners would rather see it end. (Exactly the same goes regarding "states' rights" in the South, incidentally: the slavocrats ultimately gave zero damns about it as long as they could keep their slaves, but lots of common soldiers -- in war-time letters etc. -- genuinely express the belief that they are fighting for their states' liberties.) In any event, as the war dragged on, and abolition became a an increasingly realistic perspective, increasingly more Northerners were willing to commit to actually doing it.
The problem here is that this second reason, which I have stressed, takes time. The motivation you stress relies on an OTL-like situation of Southern collapse as the Union marches through CSA territory. I'll grant that this may happen in a shorter war, but I think it's unlikely. If the Confederates lose repeatedly, and they start collapsing (militarily) sooner, then that's the end. Their experiment failed, and there is no hope. No glorious early successes to boast about, just failure. Under such circumstances, I see them informing much earlier about a clean surrender on the basis of "We fully admit we were wrong, secession is forever off the table, and you let us keep our slaves". Simply going by Lincoln's position in OTL (as late as the end of 1863), we may safely assume he'd go for that. In fact, he repeatedly stated that this was his actual goal. (Everything else, he quite explicitly considered a 'bonus'.)
Naturally, the sooner the war ends (meaning: the sooner the CSA turns out to be an undeniable failure), the more likely this kind of outcome is. But going by how lenient Lincoln was even in the E.P. (every secessionist state can return to the Union individidually, no questions asked and no retribution exacted), my general time-frame remains the same. A quick war just isn't going to be able to terminate slavery, because the North will automatically prioritise ending the war over ending slavery. (We may conclude that Lincoln was a very lenient man, and the Slavocrat cabal was the most self-defeating gaggle of incompetents that could conceivably have been gathered in their day and age.)