once Parvati, Shiva's consort was cursed to become as dark as Kali. She decided to expatriate herself from sin by doing penance under the ancient Mango tree of the temple, near the river Vegavathi. Shiva sent fire on her, to test her devotion. Goddess Parvati has prayed for help to Vishnu. He took the Moon from Shiva's head in order to save her, and showed the rays that cooled down the tree as well as Parvati.
Shiva sent out the Ganga river again to interrupt the penance of Parvati. Parvati Appealed to Ganga and told her that they were both sisters and so would not hurt her. Ganga did not eventually interrupt her penance and Parvati made a Shiva Linga out of the sand to merge with Shiva. Here the Deity came to be called Ekambareswarar or "Lord of Mango Tree."
According to another myth Parvati is believed to have worshipped Shiva under a mango tree in the shape of a Prithivi Lingam. It is legend that the neighboring river Vegavati overflowed and threatened to swallow the Shiva Lingam, and that Parvati or Kamakshi embraced the Lingam. Shiva touched by the gesture, she materialized and married in person. In this sense, in Tamil he is called Tazhuva kuzhainthaar.
One of the 63 saivite saints, Tirukuripputhonda Nayanar, called nayanars, was a washerman near the temple and washed the clothes of all the Saivities. God Shiva appeared as an elderly brahmin divinely fooled him, and asked him to shower before dawn. Simultaneously Shiva did a rainy evening. The washerman banged his head in a stone in frustration as he watched the evening approach. In his true form God appeared, and graced his devotee.