Opposition to slavery had its basis on several factors, and both moral and economic considerations played a part.
The "Free Labor" ideology was at the center of Northern, and more specifically, Republican opposition to slavery. Free Labor held that the work done by Freemen was superior to the work of slaves. This ideology is the one more closely associated with economic factors. They believed that under Free Labor people were more capable of thriving and finding success, because such a system encourages competition. You have to be the best in order to succeed, and that pushes you to improve yourself personally. A capacity to improve your condition was one of the most lauded aspects of Free Labor. You were not stuck as a laborer your entire life, rather, you can improve and become an entrepreneur. The workers of today can be the hirers of tomorrow.
Republicans saw Free Labor as the natural condition of men, which provided energy, innovation, dignity, and progress. On the other hand, for them, Slavery was nothing but a corrupting force. They agreed with the words of Adam Smith, that a slave "can have no other interest but to eat as much, and to labour as little as possible." Horace Greeley joined him by stating that if you "enslave a man, and you destroy his ambition, his enterprise, his capacity. In the constitution of human nature, the desire of bettering one's condition is the mainspring of effort." “Slavery withers and blights all it touches... slavery is a foul political curse upon the institutions of our country; it is a curse upon the soil of the country, and worse than that, it is a curse upon the poor, free, laboring white man," declared a Republican.
For them, the main problem behind slavery was the fact that it was not compatible with capitalism or with a Democratic Republic. Yet, we should note that historical analysis on whether slavery was actually profitable has been disputed. Some historians believed it was not, others firmly hold that it was profitable and cite examples of successful use of slaves in factories. The consensus seems to be that in the short term slavery was profitable, but that ultimately it was living on borrowed time, and it inhibited the economical growth of the South.
Some Republicans saw slavery as a threat and opposed it because they believed it was danger towards White men. Competition with Slavery was degrading. If Slavers were allowed to take the lands of the west, they would be closed off to White settlers, who believed that soil was theirs by God-given decree. Others battled against bondage not because of moral considerations but political ones. Southern dominance of the country was seen as detestable, and Northerners hated it. Allowing more Slave States into the Union would only continue this dominance, and thus prevent the advancement of their progressive platform, which included tariffs, aid to internal improvements, and settling the west with White men.
But the main reason behind abolitionism remained morality. The religious Second Great Awakening gave strength to the abolition movement, because they saw White and Black people as equals before God, and slavery as a sin. Religion motivated many Republicans. William H. Seward's "Higher Law" speech is a famous example, though in this case I believe it's Seward appealing to religious Republicans rather than any expression of his own faith. The popularity of Uncle Tom's Cabin is another example, because there Tom was portrayed as a Jesus-like figure, who "died for the sins of humankind in order to save the oppressors as well as his own people" (McPherson, p.91). Christian rhetoric was a powerful force behind abolitionist movements.
But even among those who weren't as deeply religious, or were more swayed by economic reasons, moral still played a part. Slavery was against the sacred principles of the US. How can you proclaim that all men are created equal and engage in slavery? Furthermore, the complete control masters had over their slaves was seen as a violation of the right of self-determination, in other words, it was seen as terrible despotism, or as Lincoln called it, a "monstrous injustice."
Economics alone wouldn't have been able to bring such a dramatic and painful struggle as the Civil War. It was morality that so excited the passions of the Nation, because Northerners started to charge against slavery as something monstrous, and Southerners became even more entrenched, defending the institution as a "blessing." And through their dominance at the Federal government they started to push for brazzen acts to defend and expand it, which in turn inflamed more the North. Slavery was economically beneficial for the North, with Northern industrialist enjoyed the cotton it produced and the money it made. But morality rendered the institution detestable. Not everybody did it because they wanted equality for Black people, or because they actually cared about them. Some, as I've already explained, believed slavery was immoral because it harmed White men, or because it prevented their preferred economic system from being the norm. Yet, at its core, the anti-slavery movement was founded on a shared disapproval of slavery because it was incompatible with American values as they saw them.
Sources: