On September 22, 1862, Lincoln announced publicly that he would issue the Emancipation Proclamation as encouraged by the Union victory at Antietam. Emancipation Proclamation is a decree freeing all enslaved persons after January 1, 1863, in the states still in rebellion.
Enslaved African Americans were freed by the Proclamation only in the states which had war with the Union. It did not free slaves in the border states. The proclamation changed the dispute over preserving the Union into a war of liberation.