Most of the world believes that the origins of mankind started in Africa, particularly around Egypt. This makes sense, since the ark landed in the Middle East.
Noah’s son, Ham, and Ham’s wife, Egyptus, had a daughter who was also named Egyptus. Egyptus the younger was the one to discover Egypt. The flood must have taken a long time to dissipate from most of the world, because when she first discovered it, Egypt was covered in water. Later she returned to settle the land with her sons.
Her oldest son, who’s name was Pharoah, established a kingdom in the land. Though Egyptus and Pharoah were Canaanites, Pharoah was a righteous man, and tried to organize his kingdom the same way that the patriarchal order of the priesthood was organized. I don’t know what generation fell away from trying to follow the order of the prophets, but the religion of Egypt eventually broke off from the original attempts to follow the gospel, and became idolatrous, believing in the worship of multiple gods, including gods made of earthly materials.
It was this fallen, idolatrous religion that Abraham’s father belonged to, and it was by the priest of this religion that Abraham was taken to be sacrificed. Accordingly, Abraham did not receive the priesthood from his Father. Rather, he received it from Melchizedek, king of Salem – who we will talk about another time.
Here’s the account of the origin of Egypt from the Pearl of Great Price:
20 Behold, Potiphar’s Hill was in the land of Ur, of Chaldea. And the Lord broke down the altar of Elkenah, and of the gods of the land, and utterly destroyed them, and smote the priest that he died; and there was great mourning in Chaldea, and also in the court of Pharaoh; which Pharaoh signifies king by royal blood.
21 Now this king of Egypt was a descendant from the loins of Ham, and was a partaker of the blood of the Canaanites by birth.
22 From this descent sprang all the Egyptians, and thus the blood of the Canaanites was preserved in the land.
23 The land of Egypt being first discovered by a woman, who was the daughter of Ham, and the daughter of Egyptus, which in the Chaldean signifies Egypt, which signifies that which is forbidden;
24 When this woman discovered the land it was under water, who afterward settled her sons in it; and thus, from Ham, sprang that race which preserved the curse in the land.
25 Now the first government of Egypt was established by Pharaoh, the eldest son of Egyptus, the daughter of Ham, and it was after the manner of the government of Ham, which was patriarchal.
26 Pharaoh, being a righteous man, established his kingdom and judged his people wisely and justly all his days, seeking earnestly to imitate that order established by the fathers in the first generations, in the days of the first patriarchal reign, even in the reign of Adam, and also of Noah, his father, who blessed him with the blessings of the earth, and with the blessings of wisdom, but cursed him as pertaining to the Priesthood.
27 Now, Pharaoh being of that lineage by which he could not have the right of Priesthood, notwithstanding the Pharaohs would fain claim it from Noah, through Ham, therefore my father was led away by their idolatry;
D&C 84: 14
14 Which Abraham received the priesthood from Melchizedek, who received it through the lineage of his fathers, even till Noah;