According to legend, Indra, the king of celestial deities and Bhudan (Mercury) worshipped Shiva at this place located in a forest called Kaaraivanam. Since it was located in Kaaraivanam, the presiding deity came to be known as Karaivananathar (Sathyanatheswarar).
Tirugnana Sambandar, a 7th-century Tamil Saivite poet, venerated Sathyanatheswarar in one verse in Tevaram, compiled as the First Tirumurai. As the temple is revered in Tevaram, it is classified as Paadal Petra Sthalam, one of the 275 temples that find mention in the Saiva canon.
As per Hindu legend, Chandra (moon) was under the tutelage of Guru (Jupiter). He wanted to marry Guru's wife, Dhara and did a yagna seeking the boon from Vishnu.
Guru attended the function with Dhara, when she was allured by Chandra. Budha was born to Chandra and Dhara. When Budha became an youngster, he came to know about his birth, felt ashamed and started doing a penance praying to Shiva to include him as one of the Navagrahas at this place.
Shiva was pleased by his devotion and appeared as Sathyanatheswarar to offer him the boon. As per another legend, Indra, the king of Devas, the celestial deities, was attracted by the beauty of Ahalya, the wife of sage Gautama. He took the form of a rooster to wake the sage early in the day. The sage started his day by going to the river, leaving Ahalya alone in the house. Indra entered the house to attain Ahalya, but the sage sensed something was wrong in the day.
He returned to the hermitage and saw Indra escaping as a cat. He cursed Indra to have eyes throughout his body. Indra was roaming around and started doing penance at this place to regain his appearance.