I have read probably 25 books about the Civil War, and what I think happened is that at the beginning of the war, Lincoln knew he had to save the Union. He campaigned on that premise, spoke about the fact that our great experiment (just 85 years old at the start of the Civil War) was going to be judged by what happened. He had to save the Union and was never going to allow the South to break apart the Union.
Most don't know this, but the number of deaths due to enemy fire between the start of the Civil War on April 12, 1861 and May 23, 1861 was ... zero. The casualty count in total as of May 23, 1861 was one, a private named Daniel Hough, who died at Fort Sumter when a Union cannon misfired.
Slavery was of course the issue dividing the states, and more importantly for the combatants, the spread of slavery into the massive territory the United States acquired from the Mexican-American war. Most of that territory was south of the imaginary line crafted by the Missouri compromise (Texas, Arkansas, New Mexico territory that included what was later Arizona, Utah territory that included what was later Nevada).
The Southern states focused in significant part on the argument that the Federal government could not change their internal policies on slavery, and indeed that was an argument rooted in fact until adoption of the 13th, 14th and 15th amendments in 1864. So the Southern states were telling Northern states that they could not govern the Southern states or tell them how to run their affairs; the Northern states insisted that slavery was immoral and repugnant to the principles underlying the nation and that the Union needed to be maintained.
The war progresses, and by Shiloh in April of 1862, the carnage was becoming more and more clear. Casualties were basically announced by posting names in a public square. The names wound up requiring lists that became 2 pages, then 3, then 5, then 10.
By the middle of 1862, Lincoln knew that the death toll was simply too much to be justified to "preserve the Union." He struggled with the fact that he was the one who could end the deaths, right now, by simply agreeing to the secession, but he could not do so and preserve the Union. He decided that the war had to be about more than the Union, or state's rights, or a democratic form of government. On July 22, 1862, Lincoln told his cabinet that he was going to issue the proclamation but that he wanted to wait for a considerable Union victor before doing so.
He published the Emancipation Proclamation in September of 1862, after the dreadful battle at Antietam, where 22,700 Americans wound up dead, wounded or missing. The Emancipation Proclamation freed slaves ... only in the rebelling states but NOT in slave-holding Union states that included Kentucky, Missouri, Delaware, Maryland and the District of Columbia itself.
Lincoln tied the huge, overwhelming cost in lives and injuries to the concept of freedom, ending slavery, since having hundreds of thousands die simply to preserve a form of government just did not make sense any more. That's my take and one shared by several of Lincoln's cabinet, including Stanton.