अनभ्यर्च्य गणेशानं त्रिपुरेण सदाशिवः |
प्रारभच्चैव संग्रामं विघ्नेन पीडितश्शिवः ||
पराजयं तु संप्राप नारदेनैव बोधितः |
द्वादशाब्दं तपश्चक्रे ध्यात्वा देवं गणेश्वरम् ||
हृदिस्थं ब्रह्मतेजस्तत् ववृधे तपसो बलात् |
शिवस्य पञ्चवक्त्रेभ्यः प्रादुरासीद्बहिः स्थले ||
पञ्चमातङ्गवक्त्राढ्यो बभूव च गणेश्वरः |
उपादिशच्छङ्कराय स्वकं नाम्नां सहस्रकम् ||
तस्य प्रसादात्त्रिपुरं जघान च सदाशिवः |
पञ्चवक्त्रगणेशोऽयं गजाकारश्शिवात्मकः ||
ध्याये दन्ताक्षमालापरशुसृणिगुणान् मुद्गरं मोदकं च
दिग्भिर्दोर्भिः कपालं वरदमभयदं धारयन्तं त्रिणेत्रम् |
हेरंबं चन्द्रचूडं स्फटिकमणिनिभं मुण्डमालं गुणेशं
नागं पाशं सुघंटां प्रलयहुतवहं चाङ्कुशं बाहुभिस्स्वैः |
शूलं वज्रं सुखड्गं परशुमभयदं चापि बिभ्राणमाद्यं
वन्दे सर्पावलग्नं पुररिपुवरदं पञ्चमातङ्गवक्त्रम् ||
Before commencing the battle with Tripurāsura, Sadāśiva failed to propitiate Mahāgaṇapati and as a result, suffered a crushing defeat at the hands of the wretched asura. The Great Lord Shambhu then performed the upāsanā of Gaṇanāyaka for a period of twelve years. The Vaināyakī tējas that resulted from his tapas emanated from all the five faces of Mahādēva to take the form of Hēramba Mahāgaṇapati. Hērambēśa instructed Sadāśiva into the secrets of his mantra and sahasranāma and by his grace, Shambhu destroyed Tripura.
Sadāśiva thus became the first teacher to reveal the mantra and upāsanā of this special form of Gaṇapati, and also the r̥ṣi of the mahāmantra. The mantra was passed to Kārtikēya, Nandin, Kaśyapa, and Agastya by Sadāśiva in the four yugas respectively. Each of the four yuga-gurus worshipped the Lord with four different mantras. The form popularly used today is the one that was transmitted by Sadāśiva through Kaśyapa. The Lord is invoked in his rajō-pradhāna mūrti (as described in the dhyāna ślōka above) by Kaśyapa. The mantra transmitted through Kārtikēya is a mālāmantra used chiefly for nigraha. The mantra transmitted through Nandin is referred to as Pañcamātaṅgāstra and is the crown jewel of vaināyakī-vidyā. Finally, the mantra transmitted by Agastya is closely associated with Rasavāda and is known to have been taught by Bhōganātha.
After Mahāgaṇapati and Ucchiṣṭa Gaṇapati, Hēramba is probably the most celebrated form in the Tantras. The number of prayogas listed for this form exceeds those for other forms by a huge number. Hēramba has his own five āmnāyas and is described as Pañcāmnāyātmaka-mūrti – his origin from the five faces of Sadāśiva described variously. Several popular prayogas of this mūrti use the pañcabrahma mantras of Sadāśiva in conjunction with the five variations of the Hēramba manu (Kaśyapōkta).
The power and grace of this form of the great Gaṇanāyaka can only be experienced through upāsanā, not sufficiently expressed through words. While I have always cherished Ucchiṣṭa Gaṇapati as the dearest form, perhaps more so than even Parāmbā at times, it was through the Hēramba mantra that the Lord first graced me on one caturthī, when suddenly, in the middle of the night, amidst Japa, he came and sat on my lap like a little child. Everything changed that night and every breath since then has been merely a feeble attempt to thank him for his magnanimous grace towards a completely undeserving soul.
Sri Muttuswami Dikshitar celebrates this form of Vighnādhipa in his famous kr̥ti in Rāga Mahalari:
श्रीपञ्चमातङ्गमुख गणपतिना
परिपालितोऽहं सुमुखेन ||
पञ्चभूतात्मक प्रपञ्चोदयादिकरण
विरिञ्चिहरिरुद्रनुतेन पञ्चवक्त्रशिवसुतेन ||
वरदाभयपाशसृणिकपालदन्त-
मोदकमुद्गराक्षमाला करेण |
कमलापुरविहारेण
पुरूहूताद्यखिलदेवपूजित विघ्नेश्वरेण ||
वरगुरुगुहसोदरेण सुरुचिरलम्बोदरेण |
करुणार्द्रगौरतरेण कलिमलहरणचतुरेण ||