Chidambaram is one of the many temple towns in the state which is named after the grooves, clusters or forests dominated by a particular variety of a tree or shrub and the same variety of tree or shrub sheltering the presiding deity. The town used to be called Thillai, following Thillaivanam, derived from the mangrove of Tillai trees (Exocoeria agallocha) that grow here and the nearby Pichavaram wetlands.
According to a Hindu legend, once Shiva and Parvati wanted to judge who among them was a better dancer, and wanted their sons Vinayaka and Murugan to judge their performances. Both of them judged in favour of Parvati, after which Shiva was not satisfied. He wanted Brahma to judge, and the competition was held in Thiruvalangadu. Brahma was still not satisfied, and he wanted Vishnu to judge, and the latter wanted the competition in Tillaivanam.
Shiva performed the Urthvathandavam pose of picking his earring with his legs, and wearing them in the ear with his legs. Parvati was not able to perform the feat, and due to her frustration at her defeat, became Kali at the Thillai Kali temple.
The Govindaraja shrine is dedicated to Vishnu and is one of the 108 holy temples of Vishnu called Divya Desam, revered by the 7th-9th-century saint poets of the Vaishnava (Vishnu-centric) tradition, the Alvars. Kulashekara Alvar mentions this temple as Tillai Chitrakutam, and equates Chitrakuta of Ramayana fame with this shrine. King Kulothunga Chola II is believed to have uprooted the presiding Govindaraja image from the shrine.
Kulothunga was a Shaiva king, and he wanted to establish the supremacy of Shaivism by destroying Vaishnava temples and killing Vaishnavas. The shrine has close connections with the Govindaraja temple in Tirupati, dating back to the saint Ramanuja of the 11-12th century.Ramanujar fled to Tirupati with the utsava (festival image) of the temple to escape persecution.
In the 16th century, king Krishnappa Nayak was instrumental in installing the image of Govindaraja back in the temple.There was a lot of resistance from those belonging to the Shaiva (Shiva-centric) tradition against reestablishing the Vishnu image in what had become a revered Shiva temple, but the king was unmoved, and the image was installed in the present form.
There is no satisfactory evidence of co-existence of the Shiva and Vishnu shrines within the same temple built during the same time – there was a dispute in 1849 regarding the rights on the Govindaraja idol and Alvar Sannidhi (sanctum of Alvars) between Vaishnavas and Dikshitars, and the position of Vaishnavas was upheld by the district court.