Marx gave full support to the Union cause, even though Lincoln initially refused to make emancipation a war goal. Marx was confident that the clash of rival social regimes, based on opposing systems of labor, would sooner or later surface as the real issue.
https://jacobin.com/2012/08/lincoln-and-marx
Jacobin dot com