Lincoln clearly was fighting to preserve the Union. His only hit on slavery was that it not be allowed to spread into the national territories. He used an analogy. Having slavery in some of the states was like having a snake in the bed with yur children. How to get the snake out without harming the children? That is difficult. What was easy, in Lincoln's view, was to prevent that snake from entering your other children's bed. And that he refused to countenance. And the war came.
All that said, once black soldiers fought under Old Glory, he firmly believed they should have the right to vote, and he worked towards that end. That is why Booth shot him.
Walt