The Pyramid Texts
When
c. 2400-2300 BCE, Fifth and Sixth Dynasties
Where it survives
Carved inside the burial chambers of pyramids at Saqqara
What it is
The oldest substantial religious writing to survive from anywhere. Spells to carry the dead king into the sky to join the imperishable stars and the sun god. Not a narrative: a working ritual apparatus, in fragments.
Read it with this in mind
They were written for the king and no one else. Reading them as general Egyptian belief imports a royal theology into a population that had no access to it.
Myths attested here
The murder of Osiris
Alluded to from c. 2400 BCE; told as a connected narrative only c. 100 CE
The one Egyptian myth everyone can name, and the one where the famous version is Greek.
Creation at Heliopolis
c. 2400 BCE, in the Pyramid Texts
One god alone on a mound in the water, producing the first pair from himself.
Other sources