It was really all about wealth, as with most wars. It was the industrialization of the north that lead to their freeing of slaves, not some moral movement. That same industrialization was prohibited from reaching the south. If the south had been allowed to industrialized at the same pace as the north, there may not have been a civil war. even if all the issues couldn't have been addressed, there were several artificial drivers, largely coming from the north, that kept the south from developing.
Industrialization, especially in the 1800s, required large capital investments and generally a geographic driver. generally access to water. either for internal trade allowing many pieces to come together from disparate parts, powering mills through water wheels, or outside trade ultimately selling. Due to weather agriculture in the north was never going to compete with agriculture in the south, and they had to change sooner to industrialization.
The north also typically had a shorter route to a coast, and also generally went to the Atlantic coast where most of the trade partners were in Europe. The south had several states with Atlantic access, but about half of the trade still had to go south once you got over the Continental divide, even Georgia with an Atlantic coast, about half the state drains to the southern Gulf not the Atlantic. so trade was physically restricted.
Through a number of tariffs, including but not limited to, The Tariffs of 1828, 1857, the Morrill Bill/Tariff, foreign trade was directly restricted. the tariffs were designed to protect the manufacturing industry, not the agriculture side. typically there were higher export tariffs on raw goods, cotton, wool, tobacco leaves, food, than there was on finished goods like clothes, refined tobacco products, or packaged foods. This cut back on how much foreign trade the south could do, and we decreased market access they were forced to sell their goods to the north at discounted prices. the north then turned that raw good into a refined product, and was able to sell it at a much higher profit margin than the south could. Prices for everything in the south was higher than it was in the north due to this.
There were also the emergence of several strong monopolies operating out of the north that colluded to shut down competition in the south with various price gouging and other methods. the Sherman anti-trust act wasn't passed until 1890. had it come about half a century earlier there may not have been a civil war. They often conspired with various lenders, and other related industries like rail roads to avoid expanding into the south. There were a couple big names who had some hands in this, JP Morgan was really starting to get his feet wet when the Civil War kicked off. Carnegie as well already had investments in steel, rail, and the like by 1860. definitely not the giants they later were, but they were already practicing what made them rich. and they were working with the existing monopolies, and a key part of all of that was geographic centrality.
So a combination of geographic benefits, and federal level laws artificially drove industrialization in the north, while denying the south direct profits that would have spurred industrialization. because of the larger tariffs on unrefined goods shipping companies were more focused in the north, again feeding the localization of industry. and then the monopolies ensured that industrialization stayed in their control. Over time the south began to see all these laws passed as directly isolating them, while solely benefitting the north and Washington.
If slavery wasn't a money making industry no one would have cared and it would have dried up on its own even in the south. saying the civil war was about slavery is the same as saying it was about state's rights. they are both partially correct, but doesn't get to the drivers of why those things are important. it wasn't a moral crusade to free the south of federal overreach, nor a northern one to end slavery in the US. it was all about wealth and the control it provides.