The Markandeya Purana especially comprises a dialogue between Markandeya and a sage called Jaimini, and a number of chapters in the Bhagavata Purana are dedicated to his conversations and prayers. He is also mentioned in the Mahabharata. Markandeya is venerated within all mainstream Hindu traditions.
One legend relates the story of how Shiva protected Markandeya from the clutches of death, personified as Yama.
Mrikandu rishi and his wife Marudmati worshipped Shiva and sought from him the boon of begetting a son. As a result, he was given the choice of either a righteous son, but with a short life on earth or a child of low intelligence but with a long life. Mrikandu rishi chose the former and was blessed with Markandeya, an exemplary son, destined to die at the age of 16.
Markandeya grew up to be a great devotee of Shiva and on the day of his destined death, he continued his worship of Shiva in his aniconic form of Shivalingam. The messengers of Yama, the god of death were unable to take away his life because of his great devotion and continual worship of Shiva. Yama then came in person to take away Markandeya's life and sprung his noose around the young sage's neck. By accident or fate the noose mistakenly landed around the Shivalingam, and out of it, Shiva emerged in all his fury attacking Yama for his act of aggression. After defeating Yama in the battle to the point of death, Shiva then revived him, under the condition that the devout youth would live forever. For this act, Shiva was thereafter also known as Kalantaka ("Ender of Death").
This event, it is said, took place on the bank of Markanda river in Kurukshetra district. Ancient Markandeshwar Mahadev Temple was built on the site, which has been re-built as a magnificent and modern temple, in the modern times. According to another opinion, this is believed to have happened in Thirukkadaiyur, Tamil Nadu.
As sourced from Sati Purana, a secret portion of Markandeya Purana, Goddess Parvati also gave him a boon to writing a text on Veera Charitra (Fighting character) on her, the text is famously known as Durga Saptashati, a valuable portion in Markandeya Purana. The place is known as Yamkeshwar.
A tale from the Bhagavata Purana states that once sage Markandeya visited Narayana and asked him for a boon. Markandeya prayed to sage Narayana to show him his illusory power or Maya since sages Nara-Narayana is the incarnation of Supreme Lord Narayana. To fulfill his wish, Vishnu appeared in the form of a child floating on a leaf and declared to the sage that he was Time and Death. Sage Markandeya entered into his mouth and saved himself from the surging water. Inside the boy's stomach, Markandeya discovered all the worlds, the seven regions, and the seven oceans. The mountains and the kingdoms were all there. So were all living beings. Markandeya did not know what to make of all this. He started to pray to Vishnu. No sooner had he started, than he came out of the boy's mouth. Vishnu now appeared before him and blessed him. The sage spent a thousand years with Vishnu. He composed the Bala mukundashtakam at this moment.