Sage Mrikandu and his wife Marudvati were devout devotees of Lord Shiva. They were happily married but childless. They decided to perform penance to Lord Shiva to pray for a child.
Impressed by their devotion, Lord Shiva appeared before them and said, “You can ask for anything you want.” Mrikandu asked for a child and Marudvati asked for a blessed child. Surprised by the differences in their replies, Lord Shiva smiled and asked, “Do you wish for an ordinary child who will live longer or a gifted child who will live for only sixteen years?”
After a moment’s thought, Marudvati replied, “Bless us with a gifted child. Even though he will live for sixteen years, we will have fond memories of him for the rest of our lives.” Her husband agreed with her, and Lord Shiva blessed them and disappeared.
In due course, Marudvati gave birth to a son, who was named Markandeya. He grew up to be an exceptionally gifted child. He knew all the Vedas by heart, and mastered Mahamrityunjaya Mantra. The mantra is addressed to Lord Shiva to ward off untimely death or attain immortality.
His parents loved him a lot, but Markandeya sensed sadness in them. When he asked them about it, sage Mrikandu told him about the story of his birth. After listening to it, he understood the reason of their sadness. He promised them that he will find a solution to their problem.
As Markandeya’s sixteenth birthday approached, his mother was inconsolable. He consoled her and said, “Mother, don’t worry. I will pray to Lord Shiva and everything will be fine.”
The night he was to turn sixteen, Markandeya started reciting the Mahamrityunjaya mantra in front of a lingam. The God of Death Yama saw this, but he knew that Markandeya’s time on earth was over. He sent two of his servants to bring Markandeya, but the heat emanating from him threw back the servants.
Yama then decided to bring Markandeya himself. When he approached the praying Markandeya, he shook him violently.
Markandeya opened his eyes and pleaded, “I have not finished my prayer to Lord Shiva. Please don’t take me away until it’s over.”
Yama grew impatient and coiled a rope and threw it at Markandeya. The noose fell on Markandeya and the lingam. As Yama tightened the noose, an angry Lord Shiva made an appearance. He struck Yama and killed him. The other gods became very concerned about this. They all approached Lord Shiva and begged him to revive Yama. They explained that without Yama there will be no deaths and people will live for forever, which will create many problems. Lord Shiva relented and revived Yama.
Yama thanked Lord Shiva and enquired about Markandeya, to which Lord Shiva replied, “Markandeya will live forever.” Saying so, he blessed the child. As the myth says, Markandeya can still be seen sometimes, trapped in his sixteen years old body, singing the glories of Lord Shiva.