At the beginning of the American civil war, some Union commanders thought they were supposed to return escaped slaves to their masters. By 1862, when it became clear that this would be a long war, the question of what to do about slavery became more general. The Southern economy and military effort depended on slave labor. It began to seem unreasonable to protect slavery while blockading Southern commerce and destroying Southern production. As one Congressman put it, the slaves "...cannot be neutral. As laborers, if not as soldiers, they will be allies of the rebels, or of the Union." The same Congressman—and his fellow Radical Republicans—put pressure on Lincoln to rapidly emancipate the slaves, whereas moderate Republicans came to accept gradual, compensated emancipation and colonization. Copperheads, the border states and War Democrats opposed emancipation, although the border states and War Democrats eventually accepted it as part of total war needed to save the Union.

In 1861, Lincoln expressed the fear that premature attempts at emancipation would mean the loss of the border states, and that "to lose Kentucky is nearly the same as to lose the whole game." At first, Lincoln reversed attempts at emancipation by Secretary of War Simon Cameron and Generals John C. Frémont (in Missouri) and David Hunter (in South Carolina, Georgia and Florida) to keep the loyalty of the border states and the War Democrats.

Lincoln warned the border states that a more radical type of emancipation would happen if his gradual plan based on compensated emancipation and voluntary colonization was rejected. Only the District of Columbia accepted Lincoln's gradual plan, and Lincoln mentioned his Emancipation Proclamation to members of his cabinet on July 21, 1862. Secretary of State William H. Seward told Lincoln to wait for a victory before issuing the proclamation, as to do otherwise would seem like "our last shriek on the retreat".[135] In September 1862 the Battle of Antietam provided this opportunity, and the subsequent War Governors' Conference added support for the proclamation. Lincoln had already published a letter encouraging the border states especially to accept emancipation as necessary to save the Union. Lincoln later said that slavery was "somehow the cause of the war". Lincoln issued his preliminary Emancipation Proclamation on September 22, 1862, and his final Emancipation Proclamation on January 1, 1863. In his letter to Hodges, Lincoln explained his belief that "If slavery is not wrong, nothing is wrong ... And yet I have never understood that the Presidency conferred upon me an unrestricted right to act officially upon this judgment and feeling ... I claim not to have controlled events, but confess plainly that events have controlled me."

Since the Emancipation Proclamation was based on the President's war powers, it only included territory held by Confederates at the time. However, the Proclamation became a symbol of the Union's growing commitment to add emancipation to the Union's definition of liberty. Lincoln also played a leading role in getting Congress to vote for the Thirteenth Amendment, which made emancipation universal and permanent.

Enslaved African Americans did not wait for Lincoln's action before escaping and seeking freedom behind Union lines. From early years of the war, hundreds of thousands of African Americans escaped to Union lines, especially in occupied areas like Nashville, Norfolk and the Hampton Roads region in 1862, Tennessee from 1862 on, the line of Sherman's march, etc. So many African Americans fled to Union lines that commanders created camps and schools for them, where both adults and children learned to read and write. The American Missionary Association entered the war effort by sending teachers south to such contraband camps, for instance establishing schools in Norfolk and on nearby plantations. In addition, approximately 180,000 or more African-American men served as soldiers and sailors with Union troops. Most of those were escaped slaves. Probably the most prominent of these African-American soldiers is the 54th Massachusetts Volunteer Infantry.

Confederates enslaved captured black Union soldiers, and black soldiers especially were shot when trying to surrender at the Fort Pillow Massacre. This led to a breakdown of the prisoner exchange program and the growth of prison camps such as Andersonville prison in Georgia, where almost 13,000 Union prisoners of war died of starvation and disease.

In spite of the South's shortage of soldiers, most Southern leaders — until 1865 — opposed enlisting slaves. They used them as laborers to support the war effort. As Howell Cobb said, "If slaves will make good soldiers our whole theory of slavery is wrong." Confederate generals Patrick Cleburne and Robert E. Lee argued in favor of arming blacks late in the war, and Jefferson Davis was eventually persuaded to support plans for arming slaves to avoid military defeat. The Confederacy surrendered at Appomattox before this plan could be implemented.

Historian John D. Winters, in The Civil War in Louisiana (1963), referred to the exhilaration of the slaves when the Union Army came through Louisiana: "As the troops moved up to Alexandria, the Negroes crowded the roadsides to watch the passing army. They were 'all frantic with joy, some weeping, some blessing, and some dancing in the exuberance of their emotions.' All of the Negroes were attracted by the pageantry and excitement of the army. Others cheered because they anticipated the freedom to plunder and to do as they pleased now that the Federal troops were there."

The Emancipation Proclamation greatly reduced the Confederacy's hope of getting aid from Britain or France. Lincoln's moderate approach succeeded in getting border states, War Democrats and emancipated slaves fighting on the same side for the Union. The Union-controlled border states (Kentucky, Missouri, Maryland, Delaware and West Virginia) were not covered by the Emancipation Proclamation. All abolished slavery on their own, except Kentucky and Delaware. The great majority of the 4 million slaves were freed by the Emancipation Proclamation, as Union armies moved South. The 13th amendment,[150] ratified December 6, 1865, finally made slavery illegal everywhere in the United States, thus freeing the remaining slaves—65,000 in Kentucky (as of 1865), 1,800 in Delaware, and 18 in New Jersey as of 1860.

Historian Stephen Oates said that many myths surround Lincoln: "man of the people", "true Christian", "arch villain" and racist. The belief that Lincoln was racist was caused by an incomplete picture of Lincoln, such as focusing on only selective quoting of statements Lincoln made to gain the support of the border states and Northern Democrats, and ignoring the many things he said against slavery, and the military and political context within which such statements were made. Oates said that Lincoln's letter to Horace Greeley has been "persistently misunderstood and misrepresented" for such reasons.