Sage Mrikanda performed penance to propitiate Shiva for several years and sought from him the boon of begetting a son.
Learning his fate from his distressed parents shortly before his sixteenth year, he started to engage in severe austerities.
The messengers of Yama, the god of death, were unable to take away his life because the power of his devotion to Shiva shielded him against them.
After slaying Yama, Shiva revived him under the request of the devas, under the condition that Markandeya remain sixteen years old forever.
Alarmed by the sage's prowess, Indra tasked a number of apsaras, gandharvas, and the god of love, Kamadeva, to disrupt his ascetic practice.
Even as the torrent propelled him, the sage observed a banyan tree, upon whose branch he saw a dazzling baby upon a leaf.
Entering the form of the baby, he witnessed the entire universe, the passage of the ages, all living beings, as well as a vision of his own hermitage.
Shiva granted this boon, declaring that Markandeya would also be immortal, gain great religious merit, and also blessed with the authorship of a Purana.
aśvatthāmā balirvyāsō hanumāṁśca vibhīṣaṇaḥ।kṛpaḥ paraśurāmaśca saptaitai cirañjīvinaḥ॥saptaitān saṁsmarēnnityaṁ mārkaṇḍēyamathāṣṭamam।jīvēdvarṣaśataṁ sopi sarvavyādhivivarjitaḥ॥The mantra states that the remembrance of the eight immortals (Ashwatthama, Mahabali, Vyasa, Hanuman, Vibhishana, Kripa, Parashurama, and Markandeya) offers one freedom from ailments and longevity.
The Markandeya Purana presents Lord Shiva to be the supreme deity and includes many stories to show his divine virtues and characteristics.
Moreover, it includes the Devi Mahatmya, which emphasizes goddess Durga's virtues such as her role as the embodiment of Shakti and her ability to destroy evil for the protection of her devotees.
Traumatized by the events of the game of dice Yudhishthira felt restless and upset and wanted to find peace and guidance.