This is an entry for reference. It used to come up a lot:
The Curse of Ham (also called the curse of Canaan) refers to the curse that Ham's father Noah placed upon Ham's son Canaan, after Ham "saw his father's nakedness" because of drunkenness in Noah's tent. It is related in the Book of Genesis 9:20-27.
The "curse of Ham" had been used by some members of Abrahamic religions to justify racism and the enslavement of people of Black African ancestry, who were believed to be descendants of Ham. They were often called Hamites and were believed to have descended through Canaan or his older brothers. This racist theory was widely held during the 18th-20th centuries, but it has been largely abandoned since the mid-20th century by even the most conservative theologians.
From Jeremy Pierce:
It was an early Muslims who first (as far as we know) developed the idea that Ham was cursed. I found a quote in Edwin Yamauchi's Africa and the Bible from a Muslim who wrote in the late 7th to early 8th centuries, and the whole view is right there. Noah cursed Ham (not Canaan) by imposing slavery on Africans whenever the descendants of Shem would come across them. It attributes their hair type to the curse as well (but not, interestingly, their skin color, though it does mention their skin color). A 9th century Muslim does bring in a change of skin color because of the curse, and Yamauchi mentions other sources attributing natural slavery to black Africans because of this curse, a view that I'm pretty sure doesn't become entrenched in Europe or the Americas until the slave trade was well under way.
Its first appearance in the colonies isn't long after the British occupied American territory and started importing slaves, but it had been in Europe before that. Various versions of it appear even before the Reformation, as early as the mid-15th century, but that was in formerly-Muslim Portugal regarding the now-enslaved Moors. European theologians generally resisted the idea, and it probably didn't take serious hold until the modern concept of race came into existence through the work of Immanuel Kant and his contemporaries who sought to explain differences in physical features by means of biological essences of different races.
So Muslims, a very dominant form of which has an awful lot of problems with human rights even today, seem to be the initial impetus behind one of the key justifications of European and American slavery of blacks. This doesn't excuse the Europeans and Americans who did it, but Muslim writers were originally responsible for the idea, and it came to the colonies and Europeans via the cotton trade. I think it's time to stop blaming this on Christianity even if there were plenty of Christians who have held this view that originated in Islamic slavery. It's silly enough to blame Christianity for a view that hasn't held sway for most of Christian history but only appeared late and lasted only a couple hundred years before going the way of the dodo except in offshoot groups like Mormons. But if the view originally came from another religion entirely and has been dominant in the members of that religion's justification of slavery, while Christians steadfastly resisted it for centuries before falling sway to it for a few hundred years, I think it's justifiable to claim that those who blame this on Christianity are relying on historical ignorance.