There seems to be a similarity between the moral codes of the ancient Egyptians and the early Israelites. The Ten Commandments given by God to Moses on the top of Mount Sinai are clearly set in an Egyptian tradition and would seem to have common roots with the Egyptian Book of the Dead. Except for the first two commandments, we find the same moral rules in the Hebrew Bible that are also found in the Egyptian hieroglyphic writings. Egyptian religion was a polytheistic belief, and hundreds of gods and goddesses were worshiped in the Nile valley. These deities were believed to manifest themselves in certain images and the artists of that time captured these images in pictures and statues. This was completely forbidden by the Monotheistic God of Moses in the first two of his commandments given in Chapter 20 of the Book of Exodus: "Thou shalt have no other gods before me. Thou shalt not make unto thee any graven image, or any likeness of anything that is in heaven above, or that is in the earth beneath, or that is in the water under the earth."
Also, unlike the Israelites, Egyptians believed in a second life after death. They believed that every person has, other than his physical body, a dual spiritual nature, which they called the KA and the BA. They also regarded the name and shadow of a person as living entities, part of the spiritual existence, not just linguistic and natural phenomena. Thus Egyptians regarded death as simply a temporary interruption rather than a complete cessation of life, and believed that after their death, they faced a trial in the underworld before the god Osiris and his forty-two judges in the Hall of Judgment. In the Egyptian culture, eternal life had to be ensured by various means, including the preservation of the physical body through mummification, the provision of funerary equipment, and the presence of magical spells in the tomb to protect the dead person in his journey in the underworld.
Their composition of the texts relating to death and afterlife went back to the Pyramid Texts, the first examples of which were inscribed in the 5th dynasty pyramid of Unas (2375 - 2345 BC) at Saqqara. By the time of the 18th dynasty, about 1500 BC, these spells were copied on rolls of papyrus and placed within the coffins. These rolls have come to be known now as copies of the Book of the Dead. This is, nevertheless, a modern term, as the Egyptians themselves called it "Going Forth by Day."
The Ten Commandments represent God's orders to humans given in the imperative form; the Egyptian texts use this form:
Thou shalt not kill.
Thou shat not commit adultery.
Thou shalt not steal.
Thou shalt not bear false witness against thy neighbor.
Spell 125 of the Book of the Dead, contrary to the Book of Exodus, contains a moral code represented in a form of Negative Confession that the dead person has to recite when he descends to the hall of the Two Truths. He shall say:
Hail to thee, great God, Lord of the Two Truths. I have come unto thee, my Lord, that thou mayest bring me to see thy beauty. I know thee, I know thy name, I know the names of the 42 Gods who are with thee in this broad hall of the Two Truths . . . Behold, I am come unto thee. I have brought thee truth; I have done away with sin for thee. I have not sinned against anyone. I have not mistreated people. I have not done evil instead of righteousness . . .
I have not reviled the God.
I have not laid violent hands on an orphan.
I have not done what the God abominates . . .
I have not killed; I have not turned anyone over to a killer.
I have not caused anyone's suffering . . . I have not copulated (illicitly); I have not been unchaste.
I have not increased nor diminished the measure, I have not diminished the palm; I have not encroached upon the fields.
I have not added to the balance weights; I have not tempered with the plumb bob of the balance.
I have not taken milk from a child's mouth; I have not driven small cattle from their herbage . . .
I have not stopped (the flow of) water in its seasons; I have not built a dam against flowing water.
I have not quenched a fire in its time . . .
I have not kept cattle away from the God's property. I have not blocked the God at his processions