In ancient Egyptian legend, there was a book written by Thoth himself, the ibis-headed god of wisdom and writing. It contained all the secrets of the gods: two spells, one that let the reader understand the speech of birds and beasts and enchant the heavens, earth, and sea, and another that let the reader see the sun god in his glory and the gods themselves, even from beyond the grave. Anyone who read it would possess knowledge that no mortal was meant to have. And anyone who stole it would pay a terrible price.
The Book of Thoth is known above all from a remarkable story written in Demotic, the late form of the Egyptian language, in the Ptolemaic period. Its hero is a real historical figure — Prince Khaemwaset, son of Ramesses the Great — transformed into a legendary magician named Setne. The tale is one of the earliest ghost stories in literature and one of the first stories of forbidden knowledge.
The Historical Prince
Khaemwaset (c. 1281–1225 BCE) was the fourth son of Ramesses II and his queen Isetnofret. He served as the High Priest of Ptah at Memphis and was the crown prince for a time, though he died before his father. He is famous today as “the first Egyptologist”: he restored many ancient monuments that were already more than a thousand years old in his time, including pyramids of the Old Kingdom at Saqqara and Giza, and inscribed them with the names of their original owners.
His reputation as a learned man with a fascination for ancient tombs made him the perfect hero of a later legend about a tomb and a book of secrets.
The Tale of Setne and Naneferkaptah
The story, known as Setne I, is preserved on a papyrus now in the Egyptian Museum in Cairo, dating from the Ptolemaic period (third century BCE or later). The beginning is lost, but the rest can be reconstructed.
The Search for the Book
Setne, a prince skilled in magic, learned that the Book of Thoth lay in the tomb of Naneferkaptah, a prince who had died long ago, in the necropolis of Memphis. With his foster-brother Inaros, he went into the tomb. It was lit by a strange light shining from the book itself.
In the tomb, he found not only Naneferkaptah’s mummy but the spirits of his wife Ahwere and their son Merib, whose bodies were buried far away in Coptos but whose spirits had come to dwell with Naneferkaptah. Ahwere warned Setne not to take the book, and told him the story of how it had destroyed her family.
Ahwere’s Story
Naneferkaptah, like Setne, was a prince who loved learning and magic and spent his days reading the inscriptions of the ancients. An old priest told him where to find the Book of Thoth — for a price.
The book lay at the bottom of the river at Coptos, locked in a series of nested boxes: a box of iron, inside it a box of bronze, then a box of juniper wood, then a box of ivory and ebony, then a box of silver, then a box of gold — and inside that the book. Around the boxes coiled snakes, scorpions, and reptiles, and around them all lay an immortal serpent.
Naneferkaptah took his wife and son to Coptos. He made a magical boat and crew of wax and sent them down the river. He dug through the water by magic. He killed the serpent — but it came back to life. He killed it again, and it came back again. The third time, he cut it in two and put sand between the pieces, so they could not rejoin. Then he opened the boxes and took out the book.
He read the first spell and enchanted the heavens, earth, underworld, mountains, and sea. He understood the language of the birds of the sky, the fish of the deep, and the beasts of the hills. He read the second spell and saw the sun rising in the sky with its company of gods, and the moon and the stars.
To keep the book’s knowledge, he copied the spells onto a new papyrus, dissolved it in beer, and drank it, so that he knew everything in the book.
But Thoth was furious. He complained to Ra, and Ra gave him permission to take revenge. As the family sailed home, Merib, the young son, fell into the river and drowned. Naneferkaptah retrieved the body with magic, but could not restore his life. Then Ahwere fell into the river and drowned too. Naneferkaptah, grief-stricken, tied the book to his body with a linen band and threw himself into the river. The king had his body recovered and buried at Memphis — with the book.
The Game of Draughts
Setne was not deterred by the story. He demanded the book. Naneferkaptah’s spirit challenged him to a game of senet, the Egyptian board game. If Setne lost, he would get nothing.
They played, and Setne lost the first game. Naneferkaptah struck him with the gaming board and drove him into the ground up to his feet. He lost the second, and was driven in up to his waist. He lost the third, and was driven in up to his ears. Setne called to his brother Inaros to fetch his magical amulets. With their help, he leapt from the earth, seized the book, and fled into the daylight. The light in the tomb went with him, and the tomb was left in darkness. The voice of Ahwere cried out: “He will bring it back.”
The Seduction of Tabubu
Setne soon met his punishment. One day at the temple of Ptah, he saw a woman of extraordinary beauty named Tabubu, the daughter of a priest of Bastet. He desired her at once and sent a servant to offer her ten pieces of gold for an hour of her company.
Tabubu insisted that he come to her house. There she demanded, step by step, a series of terrible sacrifices: that he sign over all his property to her; that his children sign documents surrendering their inheritance; and finally that his children be killed and thrown to the dogs and cats. Setne, maddened by desire, agreed to everything. He heard the dogs devouring his children’s bodies below.
When at last he reached out for Tabubu, she screamed — and he found himself lying naked in the road, with no clothes, in front of the Pharaoh and his court.
It had all been an illusion. His children were alive. The whole episode was a vision sent by Naneferkaptah. Terrified and humbled, Setne returned the book to the tomb.
The Reburial
Naneferkaptah asked one more favour: to bring the bodies of his wife and son from Coptos so that the family could be buried together. Setne travelled to Coptos, found the tomb with the help of an old man — who was in fact Naneferkaptah in disguise — and brought the bodies back to Memphis. The family was reunited, and the tomb was sealed forever.
The Moral
The story is a warning about the limits of human knowledge. Both princes are learned, clever, and noble. Both seek knowledge that belongs to the gods, and both are punished. Naneferkaptah loses his family; Setne nearly loses his. Only when Setne returns the book and makes amends does order return.
The story was also clearly meant to entertain. Its magic — the wax boat, the nested boxes, the self-healing serpent, the board game that drives a man into the ground, the femme fatale who dissolves into air — makes it one of the most thrilling tales of the ancient world. A sequel, Setne II, tells of Setne’s son Si-Osire, a child magician who takes his father on a tour of the underworld.
Other Books of Thoth
References to books of Thoth appear throughout Egyptian literature. The Westcar Papyrus tells of the pharaoh Khufu seeking the number of the “secret chambers of the sanctuary of Thoth.” Greek writers such as Clement of Alexandria described forty-two sacred “books of Hermes” carried by Egyptian priests in procession. A Demotic text published in 2005 and titled by its editors The Book of Thoth is a dialogue between Thoth and a student about the nature of knowledge and the scribal arts — a real work, though very different from the legendary book of magic.
The Book of Thoth in Modern Culture
The idea of a secret book of Egyptian wisdom has had a long afterlife. In the eighteenth century, the French occultist Antoine Court de Gébelin claimed that the tarot cards were the surviving pages of the Book of Thoth — a claim with no historical basis, but one that shaped modern occultism. Aleister Crowley titled his 1944 book on tarot The Book of Thoth. The legend of Setne influenced the plot of films such as The Mummy (1999), in which a book of the dead is taken from an ancient tomb with disastrous results.
Last reviewed: September 2026.