The Emancipation Proclamation is an executive order issued to the executive agencies of the United States by President Abraham Lincoln on January 1, 1863, during the American Civil War. It was based on the president's constitutional authority as commander in chief of the armed forces; it was not a law passed by Congress. It proclaimed all slaves in Confederate territory to be forever free; that is, it ordered the Army to treat as free men the slaves in ten states that were still in rebellion, thus applying to 3.1 million of the 4 million slaves in the U.S. The Proclamation immediately resulted in the freeing of 50,000 slaves, with nearly all the rest (of the 3.1 million) actively freed as Union armies advanced. The Proclamation did not compensate the owners, did not itself outlaw slavery, and did not make the ex-slaves (called freedmen) citizens. It made the destruction of slavery an explicit war goal, in addition to the goal of reuniting the Union.
True, the EP did not "free the slaves" in all of the United States - that took a constitutional amendment - but it did free the slaves in the rebel states.
...which was moot.