As per the Legends, the Sage Sunanda of the Himalayas desired ardently to witness the divine dance of Lord Siva. Lord was pleased with his prayers and asked him to go to Tiruvalangadu and perform penance there to fulfil his wish. As instructed Sage did penance for many years that he was discovered by a hill of loose sands caused by termites on which certain reeds called Munjam began growing. The sage was thereafter called by Munjikesa. Meanwhile, Karkotaka, the serpent adoring Siva's hand, was said to have emitted its poison on His hand. The Lord ordained that the serpent should creep to Tiruvalangadu where the sage was meditating and promised to shower his grace on it when He would bless the Sage with a vision of His divine dance. Some used to say that both the Sage and the Serpent are called Vyakrapathar and Pathanjali Munivar.
Two Asuras by name Nimba and Sumba were frightening to all at Tiruvalangadu. The sages complained to Siva at Mount Kailash of their atrocities. Goddess Parvati took pity on the Sages and Her glance of pity which lead to the creation of Kali, accompanied by a host of fearful spirits. Kali reached Alangadu, killed Asuras and drank their blood, but the fury of Kali was such that her thirst for blood became unquenchable and she began manifesting her passion in cruel ways. Sage Narada rushed to Siva and urged Him to intervene in the matter and pacify Kali. Siva then came to the place in the dreadful form of Sulapani - the one armed with Sula. Kali promptly challenged the Lord to a contest in furious dance with her. She consented to be His slave if He won in the contest. It was then that Lord Siva began His Dance, witnessed by Brahma, Vishnu, and other Devas and also Sage Munchikesa and Karkotaka. In the last item of dance called Urthava Thandava, when his earring slipped down. the Lord deftly caught it by His foot and wore it even while he continued to dance. Kali accepted the defeat and Siva knowing that Kali was but an aspect of Parvati, blessed her to be by His side. He ordained that the devotees should first worship Kali and seek His blessings only afterwards. Munchikesa and Karkotaka were also blessed to be always by His side.