The boy, moved by faith on seeing worn-out cows given away, asks his father thrice whom he will be given to and is told: to Death. He waits three nights unfed at Yama's house. Yama grants three boons: his father's peace; the heaven-leading fire, which Yama names after him, adding a many-coloured chain; and, after trying to buy him off with sons, cattle, gold, land, long life and music, the answer to what lies beyond death. Yama distinguishes the good from the pleasant and teaches the unborn self and the chariot image; Nachiketa is freed from death.
Same opening. A voice tells the boy to go while Death is away, stay three nights fasting and answer that he ate Death's offspring, cattle and good works. Death bows and gives three boons: to return alive to his father; that his good works never perish; and the conquest of re-death. The second and third are both answered by teaching the Nachiketa fire.
What is different here:
A coaching voice and three sharp answers; no temptation and no teaching on the self; told to explain the name of a fire altar.
Bhishma tells it. Uddalaki sends Nachiketa to fetch things left at the river; they have been washed away, and the tired father says "meet Yama today". The boy falls lifeless, is mourned all night and revives under his father's tears. He reports a golden hall where Yama received him as a guest, said he was not dead, and at his wish showed him in a chariot the bright worlds, rivers of milk and hills of ghee kept for givers of cows.
What is different here:
No sacrifice or three boons; the words act as a curse; the boy dies and revives; the point is the merit of giving cows.
Sources: The Upanishads, tr. F. Max Muller (Sacred Books of the East 1 and 15); The Mahabharata, tr. K. M. Ganguli (1883-96), sections read for the Vedic layer