If Lincoln had invaded the Confederate States to abolish slavery, he would not have had the public support he needed to wage the war. He decided that the cause of preserving the Union was politically correct while freeing the slaves was not.
While it is true that the Civil War led the the abolition of slavery it was not Lincoln's primary and stated objective.
He made it clear in the first inaugural address that he had no lawful right and no desire to end the institution of slavery where it already existed. He did not wage the war to free the slaves, he waged it to prevent the secession of the southern states.
Lincoln did not want to end the institution of slavery in the south, he only wanted to confine it to the states where it already existed.