You were taught wrong.
The Emancipation Proclamation immediately freed 50k to 75k slaves in areas occupied by the Union Army but not specifically excluded in the EP.
As the Union Army advanced for the rest of the War, the EP was made effective in the areas occupied.
In the final analysis, the vast majority of slaves, something well over 3M, were freed by the EP. It didn't become fully effective everywhere on the day it was promulgated, since it had to be enforced.
But then our Declaration of Independence wasn't fully effective on July 4, 1776, either. Was it?
Border states that stayed with the union were thus exempt, but many passed laws abolishing slavery before the civil war ended.
Source: www.pbs.org Africans in America series. Resource Bank: Emancipation Proclamation