Vajashravasa decided to offer all his possessions to the gods, hoping for a reward. However, his son Nachiketa discovered that his father was only offering elderly, barren, blind or lame cows, which were not acceptable for a sacrifice that would earn a spot in paradise. Nachiketa asked his father, "I too am yours, to whichever God would you offer me?" He wanted the best for his father's sacrifice. Vajashravasa, annoyed by Nachiketa's persistence, said, "I surrender you to Yamaraja Himself!"
Nachiketa went to Yamaraja's house, but Yama was not there, so he had to wait three days for food and water. When Yama returned, he was disappointed to learn that a Brahmin visitor had been left hungry and thirsty for such a long time. In Indian tradition, guests are considered equivalent to gods, and causing difficulties for them is considered a major sin. Yama asked Nachiketa to ask for three boons to make amends for his mistake.
Nachiketa first asked for peace for himself and his father, which Yama granted. Then he asked to learn about the sacred fire sacrifice, which Yama explained. Finally, Nachiketa asked to know what happens after the body dies. Yama hesitated to answer this question, claiming that even the gods did not know the answer. He offered Nachiketa a lot of money to ask for another boon instead, but Nachiketa refused, saying that material goods are fleeting and cannot bestow immortality.
Impressed with Nachiketa's wisdom, Yama explained the nature of the real Self, which lives on after the body dies. The essential realization is that this Self is inseparably linked to Brahman, the highest spirit and the life force of the universe. Nachiketa returned to his father as a jivan-mukta, having learned the wisdom of Brahman from Yama.