That's quite the oversimplification of the purpose of the civil war. Lincoln would disagree.
"My paramount object in this struggle is to save the Union, and is not either to save or to destroy slavery. If I could save the Union without freeing any slave I would do it, and if I could save it by freeing all the slaves I would do it; and if I could save it by freeing some and leaving others alone, I would also do that." Lincoln carefully noted that this represented his official position. He intended "no modification of my oft-expressed personal wish that all men every where could be free."