Context:
The "just and righteous" Noah (
6:9,
7:1) plants a vineyard, gets drunk, and lies around naked in his tent. His son, Ham, happens to see his father in this condition. When Noah sobers up and hears "what his young son had done unto him" (what did he do besides look at him?), he curses not Ham, who "saw the nakedness of his father," but Ham's son, Canaan. "
A servant of servants shall he [Canaan] be unto his brethren." This is a typical case of biblical justice, and is one of many Bible passages that have been used to justify slavery.
9:20-25