One of the best preserved copies of The Book of the Dead (known to the ancient Egyptians as prt m hrw 'Coming Forth by Day') comes from 'The Papyrus of Ani', written in 1240 BC. This version of the book is filled with beautiful pictures of Ani and his wife as they travel through the land of the dead, and to the Halls of Ma'ati and beyond.
The papyrus goes through many of the spells used to be able to survive the afterlife, as well as hymns of praise various gods. This collection has come to be known as The Book of the Dead, though it is not a book, per se. The spells were written both on papyrus and on the walls of tombs.
Ani's papyrus is full of hymns and praises to the deities (Osiris, Ra and Hathor) and various speeches and spells to get him past the tests and judgements of the underworld. The texts relating to the weighing of the heart in the Halls of Ma'ati where Ani's heart is proven to be the same weight as the feather.
Thoth, the judge of right and truth of the Great Company of the Gods who are in the presence of Osiris, saith: Hear ye this judgment. The heart of Osiris hath in very truth been weighed, and his Heart-soul hath borne testimony on his behalf; his heart hath been found right by the trial in the Great Balance. There hath not been found any wickedness in him; he hath not wasted the offerings which have been made in the temples; he hath not committed any evil act; and he hath not set his mouth in motion with words of evil whilst he was upon earth.
The gods laud Ani, saying that he speaks the truth, and that he shall escapes the jaws of Ammut.
The Great Company of the Gods say to Thoth who dwelleth in Khemenu: That which cometh forth from thy mouth shall be declared true. The Osiris the scribe Ani, whose word is true, is holy and righteous. He hath not committed any sin, and he hath done no evil against us. The devourer Ammut shall not be permitted to prevail over him. Meat offerings and admittance into the presence of the god Osiris shall be granted unto him, together with an abiding habitation in the Field of Offerings (Sekhet-hetepet), as unto the Followers of Horus.
Horus, the son of Isis, saith: I have come to thee, O Un-Nefer, and I have brought unto thee the Osiris Ani. His heart is righteous, and it hath come forth from the Balance; it hath not sinned against any god or any goddess. Thoth hath weighed it according to the decree pronounced unto him by the Company of the Gods, and it is most true and righteous. Grant thou that cakes and ale may be given unto him, and let him appear in the presence of the god Osiris, and let him be like into the Followers of Horus for ever and ever.
Afterwards, Ani has spells to recite to allow him past the seven 'Arit', so he can be transported to live among the blessed spirits in the domain of Osiris. The Arit are guarded by a doorkeeper, a watcher and a herald. Knowing the name of these guardians, and knowing the spell would allow one to pass through.
If [these] words be recited by the spirit when he shall come to the Seven Arits, and as he entereth the doors, he shall neither be turned back nor repulsed before Osiris, and he shall be made to have his being among the blessed spirits, and to have dominion among the ancestral followers of Osiris. If these things be done for any spirit he shall have his being in that place like a lord of eternity in one body with Osiris, and at no place shall any being contend against him.
The next ordeal was to pass the 'Pylons of the House of Osiris', and here, too, knowing the name and the spell would allow Ani to pass through. At each of the twenty one Pylons, Ani had to recite the correct spell before continuing on to Osiris.
[And the god Osiris saith:] "Thou hast come, thou shalt be a favoured one in Tetu, O Osiris Auf-ankh, whose word is truth, the son of the lady Shert-en-Menu, whose word is truth."
Following these trials are a number of spells to be said for the deceased at his funeral, complete with instructions to the priests who would read the papyrus over the body. Here, for instance, is 'The Chapter of Not Letting the Heart of the Osiris, The Assessor of the Divine Offerings of all the Gods, Ani, Whose Word is Truth Before Osiris, Be Driven Back from Him in Khert-Neter':
He saith:- My heart of my mother. My heart of my mother. My heart-case of my transformations. Let not any one stand up to bear testimony against me. Let no one drive me away from the Tchatcha Chiefs. Let no one make thee to fall away from me in the presence of the Keeper of the Balance. Thou art my ka the dweller in my body, the god Khnemu who makest sound my members. Mayest thou appear in the place of happiness whither we go. Let not make my name to stink Shenit Chiefs, who make men to be stable. [Let it be satisfactory unto us, and let the listening be satisfactory unto us, and let there be joy of heart to us at the weighing of words. Let not lies be told against me before the Great God, the Lord of Amentet. Verily, how great shalt thou be when thou risest up in triumph!]
These words are to be said over a scarab of green stone encircled with a band of refined copper, and [having] a ring of silver; which shall be placed on the neck of the Khu (the deceased), etc.
These spells were recited to allow the deceased to speak, to have magical powers, to not allow the ab to be left behind, to have protection against fire and dominion over water, to be able to breath the divine air, to not let others speak evil against the deceased, to become one with the imperishable stars, to not allow the Khat to decay and rot away. There are many more spells that were to keep physical parts of the deceased in good condition, and to give the metaphysical parts magical powers and the ability to live on with the gods in the afterlife. For instance, there is a chapter on making the sahu enter the Duat on the day of the funeral! There was even a spell to allow the ba and the khaibi to move freely:
The Osiris the scribe Ani, whose word is truth, saith:- The place which is closed is opened, the place which is shut (or sealed) is sealed. That which lieth down in the closed place is opened by the Ba-soul which is in it. By the Eye of Horus I am delivered. Ornaments are stablished on the brow of Ra. My stride is made long. I lift up my two thighs [in walking]. I have journeyed over a long road. My limbs are in a flourishing condition. I am Horus, the Avenger of his Father, and I bring the Urrt Crown [and set it on] its standard. The road of souls is opened. My twin soul seeth the Great God in the Boat of Ra, on the day of souls. My soul is in the front thereof with the counter of the years. Come, the Eye of Horus hath delivered for me my soul, my ornaments are stablished on the brow of Ra. Light is on the faces of those who are in the members of Osiris. Ye shall not hold captive my soul. Ye shall not keep in durance my shadow. The way is open to my soul and to my shadow. It seeth the Great God in the shrine on the day of counting souls. It repeateth the words of Osiris. Those whose seats are invisible, who fetter the members of Osiris, who fetter Heart-souls and Spirit-souls, who set a seal upon the dead, and who would do evil to me, shall do no evil to me. Haste on the way to me. Thy heart is with thee. My Heart-soul and my Spirit-soul are equipped; they guide thee. I sit down at the head of the great ones who are chiefs of their abodes. The wardens of the members of Osiris shall not hold thee captive, though they keep ward over souls, and set a seal on the shadow which is dead. Heaven shall not shut thee in.
These spells even talk about giving Ani the ability to return to look on his earthly house and to come back against his enemies.
Sets of transformation spells written to allow the deceased to turn into a wide variety of animals - swallows, hawks, serpents, crocodiles, herons and even a phoenix. Other transformations included the ability to turn into a holy lotus, or even into different gods.
A chapter of 'Negative Confessions' has Ani speaking to each god who sits in judgement, saying that he has not committed a number of sins - violence, theft, murder, lies, adultery and arrogance to name a few.
Finally, in the Duat, Ani was able to give homage to the gods in the Halls of Ma'ati
The doors attempt to block Ani's path through, but the deceased must name each part of the door before it would allow him to pass to stand before Thoth.
"Advance now, [thy name] shall be announced to him. Thy cakes shall come from the Utchat (Eye of Horus or Ra), thy ale shall come from the Utchat, and the offerings which shall appear to thee at the word upon earth [shall proceed] from the Utchat." This is what Osiris hath decreed for the steward of the overseer of the seal, Nu, whose word is truth."
Finally Ani is allowed to become like a god. Each part of his body becomes like that of a deity - his eyes like the eyes of Hathor, his face like the face of Ra, the cheeks of Isis, the backbone of Set, the belly of Sekhmet, buttocks of the Eye of Horus, the phallus of Osiris, the thighs of Nut and the feet of Ptah. Each part changes until Ani is as a god.
Isis and Nephthys become his protectors, as they protected Osiris. The four Sons of Horus come to act as his guardians, to smite his enemies. Ani says to his new protectors:
I am a perfect soul dwelling in the divine egg of the Abtu Fish. I am the Great Cat which dwelleth in the Seat of Truth, wherein the god Shu riseth.
Ushabti figures come to life and offer to do any work for Ani, to plough the fields and irrigate the land in the Land of the West, whenever he calls. Another spell provides Ani with meat and milk from the Seven Cows and their Bull, giving him their names, and power over them.
Through the spells in The Book of the Dead, the scribe Ani is able to overcome any obstacle in his path, and to provide himself with food and drink and everything he needs to dwell happily in the Land of the West for eternity. He has gained such power and such magic that he is, himself, like a deity and can live among the gods.
Ani's papyrus was the best preserved with its beautiful images mostly intact, but there were many version of The Book of the Dead. The earliest were in the pyramids - known as the Pyramid Texts - such as those for Unas, Teta and Pepi I. Later on, there were versions written on papyrus and left in the tomb of the deceased. There were huge changes made over time, with only select spells being used or, later in Egyptian history, the more ritual parts of the text disappearing completely. There were also changes made that were influenced by whichever god had the most powerful priests at the time. Eventually manuscripts of these spells were pre-written and sold with spaces left for a name!
The title 'Coming Forth by Day' refers to the belief that the deceased took a whole night (as did Ra with his solar barque) to travel through the realms of the dead. The said spirit would then emerge with the sun, triumphant.
A full version of the Papyrus of Ani has been translated as The Egyptian Book of the Dead by E.A. Wallis Budge.
The Book of the Dead, the ceremonies, rituals and magic were all done in the hopes that one could reach the Land of the West and a happy afterlife, filled with good things. To live forever with the gods. To, once more, come forth by day as a living man would awaken with the sun.