In Aztec mythology, the god Nanauatl (or Nanauatzin, the suffix tzin implies respect or familiarity), the most humble of the gods, sacrificed himself in fire so that it would continue to shine on Earth as the sun, thus becoming the sun god. Nanahuatl means "full of sores". In the borgia codex, Nanahuatl is represented as a man emerging form a fire, originally this was interpreted as an illustration of canibalism.

The Aztecs had several different myths about the creation, and nanahualt participate in several. In the legend of Quetzalcoatl, Nanauatl helps Quetzalcoatl to obtain the first grains which will be the food of humankind.

In Aztec mythology, the universe is not permanent or everlasting, but subject to death like any living creature. However, even as it died, the universe would be reborn again into a new age, or "Sun." Nanauatl is best known in the "Legend of the Fifth Sun," recopilated by Sahagun.

In this legend, which is the basis for most nahuatl myths, there has been four creations, in each one, one god has taken the toil of being the sun: Quetzalcoatl, Tezcatlipoca, Tlaloc, and Ehecatl. Each age inevitably ended because the gods were not satisfied with the men they had created. Finally Quetzalcoatl, retrieves the sacred bones of their ancestors, mixed with corn and his own blood, manages to make acceptable human beings. But no other god wants the task of being the sun.

The gods decided that the future and possibly last sun, has to offer his life. Finally, two gods are chosen: Tecciztecatl and Nanauatl, the former because he is wealthy and the latter because he is humble. Tecciztecatl is proud, and sees an opportunity to gain immortality. Nanauatl accepts because he sees becoming the sun as his duty. They are purified. Tecciztecatl offers rich presents, and coral instead of blood. Nanauatl offers his blood, and makes penitence.

The gods make a big fire, which burns for four days. When Tecciztecatl tries to jump into the fire, he is afraid and fails four times, because the heat is so strong. Because of this, the gods ask for Nanauatl. He closes his eyes to control his fear, and jumps. When Tecciztecatl sees that Nanauatl has jumped, he feels wounded in his pride and jumps after him. Nothing happens at first. But eventually two suns appear in the sky. The gods are angry, because Tecciztecatl was still following Nanauatl, and they are glowing exactly the same; so one of the gods takes a rabbit and throws it in the face of Tecciztecatl. He loses his brilliance, and the rabbit is marked on his face. So he became the moon, and the moon still has the mark of a rabbit.

But still, the sun does not move. The gods accept they need to die, so the men can live. The god Ehecatl sacrifices all the gods, and then with a powerful wind makes the sun begin to move.Men need to repay the gods their sacrifice.An important aspect of this legend is the death of the gods. The Aztec gods have no real earthly power, because they are dead, and only exist in the spiritual world, they even have to use a magic mirror made of obsidian to see the world - all of them, except Ehecatl. Ehecatl, the wind, becomes the symbol of the forces of nature: we can't see him, but we can feel his power.