He did not free the slaves in the 4 slave states that remained in the Union because he did not have the Constitutional authority to do so. The Dred Scott Decision of 1857 specifically stated that the Federal Government could not interfere with the institution of slaver in any state where it was legal. Lincoln spent a considerable amount of time trying to get Missouri, Kentucky, Maryland and Delaware to abolish slavery but he had no authority to order that action.
Lincoln Grant Sherman Sheridan and Grierson pretty much followed impulse
I live amongst the after effects of their handiworks