No it wasn't. Maryland had slavery, and so did Delaware, Kentucky, Missouri and West Virginia, and yet no armies invaded them to stamp out slavery.
Trying to force slavery to be the cause of the war is just propaganda meant to justify what the evil powers in Washington DC did to protect the financial interests of Lincoln's backers.
The war had not a D@mn thing to do with slavery, and was all about threats to the money streams of the Northeastern elite, who happened to be the same evil sons of bitches that are still running and controlling Washington DC corruption cartel to this very day.
The Corwin Amendment alone *PROVES* that slavery had nothing to do with why Northern forces invaded the South.
Northern armies invaded to protect the fat cat corruptocrats running Washington DC back in those days. And then they claimed they did it because of slavery.
Are you and I have been around on this over and over again. You will not listen to the historical facts so there’s really not much point in going any further. Don’t start in on specie and tariffs.