"Now there was a famine in the land of Canaan; and Abram went down into Egypt to sojourn there" (Gen. 12:10).
Abraham was the "father of the faithful", the great apostle of Monotheism, the wanderer from the distant "Ur of the Chaldees". He was familiar with the Babylonian greatness, as well as with its despotism. He left his homeland not knowing where he is going, and turned to a simple nomadic lifestyle, to follow a dream God has placed in his heart.
But after living as a nomad for a period of time, he ends up in the second greatest civilization of the time, Egypt. Egypt turned out to be not very hospitable to his descendants. But Abraham was forced to seek refuge in the land of Egypt; for the same reason many people were seeking refuge in the land of Egypt. Egypt was a land of security and prosperity. When droughts and famine set in on the Palestinian uplands, Egypt was the only place to turn for help. Whether it were Hebrew nomads, Hittite warriors, or Phoenician traders that suffered, Egypt was the only source of hope. The great river of Egypt provided that scarce and valuable resource of water, which the surrounding regions were often short on.
Egypt had storehouses and an established system which gathered reserves of grain for times of need. Reserves were set up by wealthy individuals and by the king. Among the highest offices in the land was the office of "steward of the public granary". The duty of the person holding this office was to help the natives and the foreigners when famine came. Of course, the king's interests were safeguarded when this help was administered (as in Genesis 47:13-26).
Abraham goes to Egypt
So when Abraham was faced with famine, he took his people and belongings and headed for Egypt. This caravan Abraham took with him probably consisted of up to 1200 people, a lot of cattle, and a lot of personal belongings. It took them 7 or 8 days of travel through the desert to reach Egypt. But as their water supply was about to run out and their camels about to drop from exhaustion, they saw the palaces and obelisks of Egypt on the horizon, and thanked the Most High for bringing them through the desert.
Agreement on the status of his wife
As they were about to enter Egypt though, Abraham was struck by a new type of worry. He used to live among the civilized pagans in Babylon before. And he remembered the violence and tyranny which was common among these people. Tradition tells us, that Abraham barely escaped an attempt of king of Babylon to kill him. He was afraid Egyptians would be no different. By this time, Egyptian kings no longer were content with just one wife. Polygamy was the new norm. Abraham was afraid that an Egyptian king would take away his beautiful wife Sarah, and then kill him. Abraham would certainly have no power to resist the king of Egypt. So as they were approaching Egypt, Abraham told his wife to say she's his sister. And she was his sister, on his father's side. No doubt, the rest of the tribe was told about the agreement, so that everyone would have the same story, in case anybody checked.
From scattered notices in the papyri, we learn that Egyptian borders were carefully guarded. The Court would immediately be notified if a body of immigrants in the numbers of Abraham's tribe were trying to enter the land. Khnumhotep, or some other chief official on the frontier, would receive the new comers, question them, and have his secretary create a report. The report would be forwarded by courier to the capital. They would wait for royal orders to come back regarding this group. In the meantime, several other reports may have been sent to pharaoh by other parties. We are told that several "princes of Pharaoh" have been struck by Sarah's beauty, and commended her to their master. Hearing these reports, pharaoh took Sarah into his house. Abraham was treated very well for her sake.
According to historian Eupolemus, Abraham and his wife settled in the sacred city of On or Heliopolis. It was the seat of learning and religion. Supposedly, at this city, Abraham lived peacefully and taught the Egyptians the sciences of astronomy and arithmetic.
The pharaoh was very pleased with the new soon-to-be wife, and treated his future brother-in-law with a lot of gifts.
Abraham leaves Egypt
But eventually, the truth surfaced. The royal house was punished, either by some sickness or death. The king became convinced that he was subject to Divine wrath, and began looking for the cause of his sufferings. Josephus thinks the priests had by this time found out the truth, and made a suggestion to pharaoh that he was punished for taking another man's wife. Other sources say that Sarah herself confessed. In either case, pharaoh quickly decided to set matters straight. Apparently, Sarah has not been married of yet. She could have been going through months of preparation, such as the one described in the book of Esther. The pharaoh called Abraham, scolded him for untruthfulness, pointed out to consequences this has brought onto his house, and likely, with a certain level of displeasure, ordered Abraham to leave Egypt. Pharaoh also ordered his people to not touch Abraham or his wife, and let him keep all the gifts he received.
By this time, the famine was over, so Abraham had no reason to continue staying anyways.
According to Canon Cook, Abraham visited Egypt between the middle of the 11th and the 13th dynasty, and most probably under one of the earliest Pharaohs of the 12th.
Hebrews in Egypt
This wasn't the only time Hebrews or people of the Semitic race entered Egypt. Over time, the number of Semitic wanders immigrating to Egypt has increased so much, that the population of the eastern half of the delta became half Asiatic. These people were ready to submit to Asiatic rule, to worship Asiatic deities, and introduced a number of their words into the Egyptian language.