The curse of Ham:
[quote] The curse of Ham is described in the Book of Genesis as imposed by the patriarch Noah upon Ham's son Canaan. It occurs in the context of Noah's drunkenness and is provoked by a shameful act perpetrated by Noah's son Ham, who "saw the nakedness of his father". The exact nature of Ham's transgression and the reason Noah cursed Canaan when Ham had sinned have been debated for over 2,000 years.
[quote] The story's original purpose may have been to justify the subjection of the Canaanites to the Israelites, but in later centuries, the narrative was interpreted by some Christians, Muslims and Jews as an explanation for black skin, as well as a justification for slavery of black people. Similarly, the Latter Day Saint movement used the curse of Ham to prevent the ordination of black men to its priesthood.
[quote] Nevertheless, most Christians, Muslims, and Jews now disagree with such interpretations, because in the biblical text, Ham himself is not cursed, and race or skin color is never mentioned.
And then...
The concept of the curse of Ham finds its origins in Genesis 9:
[quote] 20 And Noah began to be an husbandman, and he planted a vineyard:
[quote] 21 And he drank of the wine, and was drunken; and he was uncovered within his tent.
[quote] 22 And Ham, the father of Canaan, saw the nakedness of his father, and told his two brethren without.
[quote] 23 And Shem and Japheth took a garment, and laid it upon both their shoulders, and went backward, and covered the nakedness of their father; and their faces were backward, and they saw not their father's nakedness.
[quote] 24 And Noah awoke from his wine, and knew what his younger son had done unto him.
[quote] 25 And he said, Cursed be Canaan; a servant of servants shall he be unto his brethren.
[quote] 26 And he said, Blessed be the Lord God of Shem; and Canaan shall be his servant.
[quote] 27 God shall enlarge Japheth, and he shall dwell in the tents of Shem; and Canaan shall be his servant. – Genesis 9:20–27, King James Version
The objective of the story may have been to justify the subject status of the Canaanites, the descendants of Ham, to the Israelites, the descendants of Shem. The narrative of the curse is replete with difficulties. It is uncertain what the precise nature of Ham's offense is. Verse 22 has been a subject of debate, as to whether it should be taken literally, or as "a euphemism for some act of gross immorality". In verse 25, Noah refers to Shem and Japheth as the "brethren" of Canaan, whereas in verse 18 they are identified as his uncles. The Table of Nations presents Canaan and Mizraim (Egypt) among the sons of Ham (10:6). In the Psalms, Egypt is equated with Ham.
The treatment of Japheth in verses 26–27 raises questions: Why is YHWH named as the God of Shem, but not of Japheth? What does it mean that God will "enlarge" Japheth? And why will Japheth "dwell in the tents of Shem"? Further difficulties include Ham's being referred to as "the youngest son", when all other lists make him Noah's second son. Biblical scholar Nahum Sarna says that the biggest challenge of the narrative is why Canaan was cursed, rather than Ham, and that the concealed details of the shameful incident bear the same reticence as Reuben's sexual transgression.
The narrative's short five verses indicate that Canaan's Hamite paternity must have had great significance to the narrator or redactor, according to Sarna, who adds, "The curse on Canaan, invoked in response to an act of moral depravity, is the first intimation of the theme of the corruption of the Canaanites, which is given as the justification for their being dispossessed of their land and for the transfer of that land to the descendants of Abraham."