The Book of the Dead
It was believed that before the dead could enter the afterlife they had to make a dangerous journey through the underworld. They were aided in this journey by special spells that were painted on the tomb walls, the coffin, or papyrus rolls put into the tomb. The earliest texts of these spells were the Pyramid Texts, available only to royalty during the Old Kingdom. By the time of the Middle Kingdom, the Pyramid Texts had become available to more of the public. The spells were then painted on the owner's coffins, so they became known as the Coffin Texts. These texts became the basis for the Book of the Dead, spells written on papyrus rolls and available to nearly everyone during the New Kingdom. The Egyptians called the Book of the Dead texts "Chapters of Coming Forth by Day."
The most important part of the journey through the underworld was the judgment of the soul in the "Hall of Two Truths." The judgment consisted of the god Anubis weighing the deceased's heart against the feather of Maat, symbol of truth. If the deceased was judged to have lived a good life, eternal blessed afterlife was the reward. If the judgment was against the deceased, the soul became the victim of the monster Ammit.
"Thus says Thoth, Judge of the truth, to the Great Ennead which is in the presence of Osiris: Hear this word of very truth. I have judged the heart of the deceased, and his soul stands as a witness for him. His deeds are righteous in the great balance, and no sin has been found in him. He did not diminish the offerings in the temples, he did not destroy what had been made, he did not go about with deceitful speech while he was on earth." Spell 30b - The Book of the Dead