After the end of the Thirteenth Dynasty (around 1633 BC), much of Egypt came under the control of Asiatic people known as Hyksos, from the Egyptian heka-haswt, meaning "the ruler of foreign lands." These people ruled from the city of Avaris, which has not yet been found, although it probably lay near Qatana in the eastern delta. The identity of the Hyksos is not known, and there is no evidence that they invaded Egypt. It is more likely that their takeover was peaceful and came as a result of an increased Asiatic population in the delta, a phenomenon which coincided with the decline of the Thirteenth Dynasty. During the Middle Kingdom, Asiatics were employed by the state, at first in the Sinai mines and increasingly in Egypt itself.

With the disappearance of a strong central government, Egypt was a land divided. Throughout the Thirteenth Dynasty, and for some time afterward, a line of local kings ruled from Xois in the western delta. These Fourteenth Dynasty kings seem to have maintained their independence when much of the country had submitted to the Hyksos, who formed the Fifteenth and Sixteenth Dynasties. In the south, a new line of princes arose at Thebes, and these Seventeenth Dynasty rulers formed a semi-independent state. Although they paid tribute to the Hyksos, they retained their autonomy. And, after about a century, it was these princes who overthrew the Hyksos and drove them from Egypt.

Later tradition, probably based on the propaganda of the Theban victors, claimed that there was anarchy under the Hyksos, who were accused of burning temples and cities. In fact, there is no evidence for this and, indeed, everything points to their respect for Egyptian culture, which they clearly adopted. They used Egyptian titles, wrote their names in hieroglyphs, and appointed Egyptian officials and maintained the administrative system. During this time, many new developments and practical skills were introduced into Egypt. These included advanced methods of bronze making, a vertical loom for weaving, an improved potter's wheel, the lyre and lute, hump-backed cattle, new vegetables and fruits, and most important, new weapons and the horse-drawn chariot.

But whatever the reality of the nature of their rule, the Hyksos' presence was probably not popular. Throughout Egypt's history, as reliefs and inscriptions make clear, foreigners were looked upon unfavorably. However, one of the consequences of Hyksos rule was the dramatic change in Egypt's attitudes to warfare and foreign conquest. From now on, Egypt would pursue an agressive military and foreign policy, backed by a full-time and extremely professional army.

The Theban prince Seqenenre began the struggle against the Hyksos, dying in battle of fatal head wounds. His son Kamose drove them from Middle Egypt and took Avaris. In 1570 BC, he was succeeded by his younger brother Ahmosis, who drove the Hyksos out of Egypt, pursued them into Palestine, and eliminated them in a series of campaigns. He then turned south and fought the Nubians, who had supported the Hyksos.

After a decade of fighting, Ahmosis became the first Eighteenth Dynasty ruler of the New Kingdom. His first task was to restore Egypt's economy after the years of war. Raw materials from other countries appeared again, for silver, gold, lapis lazuli, and turquoise have been found in burials of this time, and they were also presented to the god Amun Re, whose cult Ahmosis fostered. The founder of this most illustrious of Egyptian dynasties died in 1546 BC.