On July 17, 1862 Abraham Lincoln and congress passed the Second Confiscation and Militia Act. This Act stated that any slave whose master that was in the confederate army was free. It was just 2 days after this act was passed that slavery was completely abolished.
Persuaded by Frederick Douglass, he was convinced that slaves should serve in the Union Forces and also the Abolition of slavery would be a goal for the war.