It is one of those supremely ironic situations that doesnt get near enough recognition.
Up until the time Lee took command of the Army of Northern Virginia (June 1862) it was Mr Lincolns stated objective that if the South ceased its rebellion, and submitted again to Union control, then slavery would remain as it had been prior to the rebellion. The original 13th Amendment, the Corwin Amendment (after the Ohio Congressman who proposed it), held that slavery was to be unmolested in perpetuity. Mr Lincoln himself endorsed this idea in his First Inaugural. (1)
It was Robert E. Lees success against far superior Union forces in the Seven Days Battles that sealed the Souths fate and slaverys demise. In driving the Army of the Potomac back, Lee turned around Confederate morale, and its soldiers took to battle with renewed purpose. That summer, however, convinced Mr Lincoln that every tactic needed to be deployed against the rebellion, including denial of its labor force and the eventual use of black soldiers. This decision would directly lead to the Emancipation Proclamation. The die was cast -- by Robert E. Lee -- and the result was eventual total war and the destruction of Southern social and political order.
(1) "I understand a proposed amendment to the Constitutionwhich amendment, however, I have not seenhas passed Congress, to the effect that the Federal Government shall never interfere with the domestic institutions of the States, including that of persons held to service. To avoid misconstruction of what I have said, I depart from my purpose not to speak of particular amendments so far as to say that, holding such a provision to now be implied constitutional law, I have no objection to its being made express and irrevocable. ~ President Abraham Lincoln, First Inaugural, March 4, 1861