It was a political play, if he banned slavery in all the Union then the states that bordered the Confederacy would have joined in on the rebellion as they still allowed slavery. Also it gave the Union the moral high ground, it wasn't a war to crush a rebellion it was to end slavery. Though whether or not Lincoln was really enthusiastic about ending slavery is still debatable. One of his early plans was to simply ship all the slaves back to Africa, modern day Liberia to be more specific.