An0cient Egyptians told stories both for entertainment and to convey a message. Storytelling in Egypt was as old as the culture itself.
However, the earliest confidently dated written story preserved from ancient Egypt is from the Middle Kingdom; it was composed in Middle Egyptian, the classic language of that period.
The works that have survived from ancient Egypt are fewer than those that the ancient Egyptians themselves knew, simply because the majority of their literary tradition was oral, or spoken, and was never written down.
One of the oldest and most favored tales of the Egyptians was the story of Sinuhe, which was preserved in six papyri and two dozen ostraca. The tale was written in the form of the biography of a courtier who fled from Egypt to Western Asia at the death of King Amenemhat the First for reasons Sinuhe never divulged. After many years in the Levant, Sinuhe felt homesick and wrote a long letter begging for forgiveness from King Senusert the First, who allowed Sinuhe to return and be reinstated at the royal court.
Autobiography was the oldest form in Egyptian literature and there are many examples of its high quality. An example is the autobiography of the official Weni, which came from his tomb-chapel at Abydos. Weni's long career spanned the period from the reign of King Teti to the time of King Merenre. Weni exaggerated his closeness to his lord, King Pepi the First, who hired him to investigate Queen Weret-Yamtes, who was apparently involved in a plot against the king.
The Book of the Cow of Heaven or the Destruction of Mankind, which was written in the late Eighteenth Dynasty on the golden shrine of Tutankhamun, was an example of the mythological tale in Egyptian literature. The story described how the sun god, Re, was faced with a rebellion of mankind, so he sent his "eye," Hathor, or in a later version, Sekhmet, down to earth in the form of a lioness, which proceeded to devour men. When Re called her back she refused, so he had to trick her. One night he created a red colored beer that looked like human blood. Sekhmet drank it all and became intoxicated. In this way Re saved humankind.
Egyptian literature also provides examples of what one might call fairy tales or folktales, like the "Tale of Two Brothers," "The Prince and His Fates," or later, the story of Setne Khamwas, a son of Ramesses the Second.
The latter story described how Setne Khamwas was fascinated by magical texts of the past, and so encountered the ghost of a long dead magician in his tomb at Saqqara. In a story within a story, he learned of an episode of the magician's life.