A demon once stole the Vedas from Lord Brahma and hid them under the sea. Lord Mahavishnu retrieved them, but the Vedas wanted purification from this sin. So, the four Vedas (Rig, Yajur, Sama, and Atharvana) came to this place and worshipped Lord Shiva, who purified them. This is why the deity here is called Sri Vedapureeswarar and the place is known as Vedhikudi.
At the entrance of the sanctum, there is a unique idol of Lord Vinayakar, with his head slightly tilted as if listening to the Vedas' chants. He is known as "Sri Veda Pillaiyar" and "Sri Sevi Saitha Vinayagar."
Another legend tells of a Chola king whose daughter's marriage was delayed. The king prayed to Lord Shiva here, who granted a marriage boon to his daughter. After her marriage, she was renamed Mangayarkarasi, after the temple's goddess.
It is believed that Lord Brahma, Suryan, Kuberan, Sage Chaitanya Maharishi, Saint Thirugnanasambandar, and Saint Thirunavukarasar have all worshipped Lord Shiva here. The temple is also associated with the Pranava mantra "OM," which worshipped Lord Shiva here, leading the Vedas to follow. This place is significant as Lord Shiva gathered priests for Nandhi’s marriage here.
The deity is also called Vazhaimadunathar because he emerged from a banana tank. The Shiva lingam is known as Vedapuriswarar.