Also, we can't ignore the fact that MANY NORTHERNERS CONTINUED TO PRACTICE SLAVERY. It's not as if they're necessarily on the moral upside, they just happened to be losing and needed the manpower along with a perceived moral arguement to continue to wage war.
No one bothered to free the slaves before the war. It was all talk.
Hell, the Emancipation Proclamation only freed slave in the Confederacy! Maryland was a slave state and in the Union yet they retained their slaves.