Obviously you haven't studied history very carefully. The EP was not until 2 years into the war. Even then, Lincoln went miles out of his way to make sure it only applied to areas the federal government did not control. It was a war measure intended to make it diplomatically difficult for Britain or France to intervene on the side of the CSA and to hopefully cause chaos in the CSA. Slavery was later abolished in 1866 because the Republicans had to try to cloak the war they had started thinking it would be easy but which instead turned into a bloodbath in the veneer of some kind of higher purpose. That most definitely was not what they went to war for.
1865. Your ignorance of history never ceases to amaze me.