The North dropped black slavery in favor of exploiting white immigrants as they were more effective and cheaper, not from any moral compunction.
Southern planters needed large numbers of workers which were not available at any price in a sparsely populated region. That need created a market for slaves, fed by Arab (Muslim) slavers in Africa and the ship owners of New England.
Blacks were not treated as trash in the South. They were expensive to purchase, far too valuable for mistreatment. They had to be housed, clothed, fed, doctored. All that was continued even after they "retired" due to age or illness. No one would say they were living in luxury but they lived about as well as the vast majority of whites at the time, north and south. And their life expectancy here was better than it was in Africa.
The flood of immigrants into northern ports provided a stream of cheap workers who received none of the advantages every slave had in the South. They were totally expendable; desperate men who would take brutally hard and dangerous work for little pay. And they had to provide everything for themselves and their families. When they were sick or old or injured they were discarded and another equally desperate immigrant worker got his job while the northern bosses just got fatter.
Those northern rich men were the driving force behind the federal government's previous moves against the South's economy that finally reached the breaking point. It was they who bought politicians and then used tariffs to bilk profit from the exports of the South, they who wanted to force the South to purchase the new, but too expensive, farming implements coming on the market.
Had the South been allowed to sell its exports properly, it would have been possible to more rapidly make the needed changes for building a more mechanized economy and, eventually, a slave free society. But the north's fat boys wanted to squeeze the south's golden goose faster. They wouldn't wait until things could settle out in the southern economy so they paid politicians and publishers and some preachers to foment public outrage in opposition to slavery. It worked. They didn't think the South would actually rebel but, when it did, they simply got fatter by feeding war materials into the north's side of the bloody fray. And other northern men, both older ones and thousands of new immigrants looking for jobs, stood in line for their turn to get shot so the rich guys could do it!
After the war, most Blacks assumed the North would be like heaven and many trekked there in hope. Those hopes were soon dashed. They were worse than expendable in the North, they were unwanted and despised far more than they had previously been. Abandoned and without hope, masses of them died from starvation, sickness and exposure in the northern "heaven". That's part of why the race riots of the 1960s-1970s period were more intensely bitter, expansive and bloody in the north than in the south, and racial hatred remains more intense up there today. The roots of the northern Black's hatred of whites runs deep!
And that's the truth!