Contrary to general belief, the Emancipation Proclamation did not free all the slaves.
The first part of the Emancipation consisted of an executive order issued by President Lincoln on September 22, 1862. This order declared the freedom of all slaves in any state of the Confederate States of America that did not return to Union control by January 1, 1863. In other words, the South had one hundred days to renounce secession before Lincoln would make official the emancipation of southern slaves.
The second order, issued January 1, 1863, put the emancipation into effect and named the specific states where it applied.
The Proclamation did not free any slaves of the border states (Kentucky, Missouri, Maryland, Delaware, and West Virginia), or of any southern state (or part of a state) already under Union control. By limiting emancipation so that it would affect only those areas in rebellion and only those individuals who supported that rebellion, Lincoln could retain the loyalty of pro-Union slave owners, and for that matter, pro-Union racists. So concerned was he lest soldiers would fight not to end slavery but only to save the Union, that he published the provisional emancipation in the form of a booklet on September 24, 1862, to be distributed throughout the Army.
Thus, at first, the emancipation directly affected only those slaves from the South who had already escaped to the Union side. Lincoln was declaring slaves free in areas that he did not control, while leaving slavery untouched in areas that he did. But hearing of the Proclamation, more slaves quickly escaped to Union lines as the Army units moved south. As the Union armies conquered the Confederacy, thousands of slaves were freed each day until nearly all (approximately 4 million, according to the 1860 census) were freed by July 1865.
After the war, abolitionists feared that since the proclamation was a war measure, it had not permanently ended slavery. Although several former slave states passed legislation prohibiting slavery, some slavery continued to be legal. The institution was not officially ended until a sufficient number of states ratified the Thirteenth Amendment on December 18, 1865.