Lord Shiva saved Maharṣi Mārkaṇḍeya from the clutch of Death is present in Śiva Māhapurana,Umā-Saṃhitā and in Skanda-Māhapurāṇa, Māheśvara-khaṇḍa, Aruṇācalaāhātmya-uttarārdha itself. And the story is also mentioned clearly in Śiva Rahasya Itihāsa.
🍁 In Śiva Māhāpuraṇa :
मार्कण्डेयो मुनिवरश्चिरंजीवी महाप्रभुः । शिवभक्तवरः श्रीमाञ्शिवानुग्रहतो हरे ॥
mārkaṇḍeyo munivaraściraṃjīvī mahāprabhuḥ | śivabhaktavaraḥ
śrīmāñśivānugrahato hare ||
~ Śiva Māhāpuraṇa , Umā-Saṃhitā, 2.40
O Kṛṣṇa, it was due to Śiva’s blessings that the excellent sage
Mārkaṇḍeya, the holy lord and foremost among Śiva’s devotees, became long-lived.
🍁 In Skanda-Māhapurāṇa :
Nandikeśvara said to sage Mārkaṇḍeya that in previous time Lord Śiva saved Mārkaṇḍeya from Yama Dharmaraja.
Thus Nandikeśvara was entreated by the son of Mṛkaṇḍu with humility
and profuse smile on the face. He told Mārkaṇḍeya who was the
greatest among the devotees of Śiva and who acquired perfection of the
body from Śiva pleased formerly by his devotion.
~ Skanda-Māhapurāṇa, 1.4.3.25
नंदिकेश्वर उवाच । मुने मनःपरीक्षार्थं तथा त्वं भाषितो मया । तव चेन्नाभिधास्यामि कस्य वान्यस्य कथ्यते ॥ त्वादृगन्योस्ति किं लोके
शिवधर्मपरायणः । येन स्वल्पायुषाप्येवं नित्येनाभावि भक्तितः ॥
कस्यान्यस्य कृते देवः स्वस्यैवाज्ञाकरं यमम् । क्रुद्धो नियंत्रयामास
चरणांगुष्ठपीडितम् ॥
~ Skanda-Māhapurāṇa, 1.4.4.1-3
Nandikeśvara said to Mārkaṇḍeya:
O sage(Mārkaṇḍeya), you have been addressed in that manner by me in order to test your mental calibre. If I do not
narrate it to you, to whom else is it to be narrated?
Is there any other person like you devoted to the holy cult of Śiva in
this world? Though you were originally destined to be short-lived,
you have become immortal by means of your devotion.
On behalf of which other persons did the Lord become angry and control Yama who executes his orders by afflicting Yama with the big
toe of his foot.
🍁 In Padma Puran (Gitapress):
Here is the complete story of how Markandeya was born to Mrikandu by the grace of Lord Shiva. And Markandeya was born with a lifespan of only 16 years. Then Markandeya worshiped Shiva. At the end of 16 years Yama came to pick up Markandeya then he sang Mrityunjaya Stotra and Lord Shiva came and saved Markandeya from death and gave him long life.
Here is the link of that chapter:
https://archive.org/details/padma-puran-gita-press-gorakhpur
Here in Padma Puran full Mrityunjaya Stotram is present...
🍁 Shri Mrityunjaya Stotram:
रत्नसानुशरासनं रजताद्रिश्रृंगनिकेतनं शिण्जिनीकृतपन्नगेश्वरमच्युतानलसायकम्। क्षिप्रदग्धपुरत्रयं त्रिदशालयैरभिवन्दितं चन्द्रशेखरमाश्रये मम किं करिष्यति वै यम: ।।1।। पंचपादपपुष्पगन्धिपदाम्बुजव्दयशोभितं भाललोचनजातपावकदग्धमन्मथविग्रहम्। भस्मदिग्धकलेवरं भवनाशिनं भवमव्ययं चन्द्रशेखरमाश्रये मम किं करिष्यति वै यम: ।।2।। मत्तवारणमुख्यचर्मकृतोत्तरीयमनोहरं पंकजनासनपद्मलोचनपूजिताड़् घ्रिसरोरुहम्। देवसिद्धतरंगिणीकरसिक्तशीतजटाधरं चन्द्रशेखरमाश्रये मम किं करिष्यति वै यम: ।।3।।
कुण्डलीकृतकुण्डलीश्वरककुण्डलं वृषवाहनं नारदादिमुनीश्वरस्तुतवैभवं भुवनेश्वरम्। अन्धकान्तकमाश्रितामरपादपं शमनान्तकं चन्द्रशेखरमाश्रये मम किं करिष्यति वै यम:।।4।।
यक्षराजसखं भगक्षिहरं भुजंगविभूषणं शैलराजसुतापरिष्कृतचारुवामकलेवरम्। क्ष्वेडनीलगलं परश्वधधारिणं मृगधारिणं चन्द्रशेखरमाश्रये मम किं करिष्यति वै यम:।।5।।
भेषजं भवरोगिणामखिलापदामपहारिणं दक्षयज्ञविनाशिनं त्रिगुणात्मकं त्रिविलोचनम्। भुक्तिमुक्तिफलप्रदं निखिलाघसंघनिबर्हणं चन्द्रशेखरमाश्रये मम किं करिष्यति वै यम:।।6।।
भक्तवत्सलमर्चतां निधिमक्षयं हरिदम्बरं सर्वभूतपतिं परात्परमप्रमेयमनूपमम्। भूमिवारिनभोहुताशनसोमपालितस्वाकृतिं चन्द्रशेखरमाश्रये मम किं करिष्यति वै यम:।।7।।
विश्वसृष्टिविधायिनं पुनरेव पालनतत्परं संहरन्तमथ प्रपंचमशेषलोकनिवासिनम्। क्रीडयन्तमहर्निशं गणनाथयूथसमावृतं चन्द्रशेखरमाश्रये मम किं करिष्यति वै यम:।।8।।
रुद्रं पशुपतिं स्थाणुं नीलकण्ठमुमापतिम्। नमामि शिरसा देवं किं नो मृत्यु: करिष्यति।।9।।
कालकण्ठं कलामूर्तिं कालाग्निं कालनाशनम्। नमामि शिरसा देवं किं नो मृत्यु: करिष्यति।।10।।
नीलकण्ठं विरुपाक्षं निर्मलं निरुपद्रवम्। नमामि शिरसा देवं किं नो मृत्यु: करिष्यति।।11।।
वामदेवं महादेवं लोकनाथं जगद्गुरुम्। नमामि शिरसा देवं किं नो मृत्यु: करिष्यति।।12।।
देवदेवं जगन्नाथं देवेशमृषभध्वजम्। नमामि शिरसा देवं किं नो मृत्यु: करिष्यति।।13।।
अनन्तमव्ययं शान्तमक्षमालाधारं हरम्। नमामि शिरसा देवं किं नो मृत्यु: करिष्यति।।14।।
आनन्दं परमं नित्यं कैवल्यपदकारणम्। नमामि शिरसा देवं किं नो मृत्यु: करिष्यति।।15।।
स्वर्गापवर्गदातारं सृष्टिस्थित्यन्तकारिणम्। नमामि शिरसा देवं किं नो मृत्यु: करिष्यति।।16।।
Translation:
🍁 In Śiva Rahasya Itihāsa :
Dēvāḥ Ūcūḥ:
पुरा मन्नेत्रपद्येन सम्पूज्याप्तं सुदर्शनम् । दैत्येन्द्रद्रावकं
साक्षाद्विश्वेशस्य कृपाबलात् ॥
मुकण्डुतनयं कालमृत्योर्योऽमोचयच्छिवः । श्वेतं च तं नृपसुतमरक्षत्कालपाशतः ।
~ Śiva Rahasya Mahētihāsa, 4th chapter, 1st amsha, verse-28,29
"In the past, I offered my lotus-like eyes to the feet of Lord Shiva.
At that time, the compassionate Lord Vishweshwara granted me the
divine Sudarshan Chakra, which is the destroyer of demons.
Did Lord Shiva not save Markandeya, the son of Mrikandu Rishi, from the clutches of death? Similarly, didn't he protect Shweta, the
prince, from the noose of Yama's restraint?
Similarly in Śiva Rahasya Itihāsa, the very famous "Chandrashekhara Ashtakam" is present. When Yama came to take Mārkaṇdeya then Śrī Chandraśēkharā Aṣtakam was sung by Maharṣi Mārkaṇdeya to seek refuge on the Lotus feet of Lord Śiva to save him from the clutch of Death. The first verse goes as -
चन्द्रशेखर चन्द्रशेखर चन्द्रशेखर पाहि माम् । चन्द्रशेखर चन्द्रशेखर चन्द्रशेखर रक्ष माम् ॥
candraśēkharā candraśēkharā candraśēkharā pāhi mām | candraśēkharā candraśēkharā candraśēkharā rakṣa mām ||
~ Oh Chandrashekara (The Lord whose crown is the moon), please protect
me. Oh Chandrashekara (The Lord whose crown is the moon), please save
me.
And in Chandraśēkhārṣṭakam Mārkaṇḍeya beseeches Śiva Candraśekhara to
protect him from Yama who had appeared as the bearer of early death;
and Mārkaṇdeya iterates the rhetoric (that he doesn't fear Yama, because his protector is Shiva):
चन्द्रशेखरमाश्रये मम किं करिष्यति वै यमः ॥
candraśēkhāramāśrayē mama kim kariṣyati vai yamaḥ ||
I seek the refuge of that God Chandrasekhara (God Shiva, who has the
moon on his head), so what can Yama do to me?
~ Shri Shivarahasya Itihasa, shivAkhyaH chaturthAMshaH, adhyAyaH 14
mArkaNDeyatapaH - kAlanigraha - mArkaNDeyavarapradAnavarNanam . 22-37