The town Vedaranyam is named after Vedaranyeswarar, the presiding deity of the Vedaranyeswarar Temple, a Hindu temple dedicated to Shiva. The place was earlier known as Tirumaraikadu, meaning the place where Vedas, oldest scriptures of Hinduism, originated. The 7th century Shaiva canonical work Tevaram by Appar and Tirugnanasambandar mentions the place as Tirumaraikadu. As per Hindu legend, the Vedas worshipped Shiva in this place, giving the name Vedaranyam to the place. According to another Hindu legend, Rama, the seventh avatar of god Vishnu, is believed to have visited Vedaranyam to absolve himself from the sins committed in the war against the Illangai King Ravana. The footprints of Rama is preserved in a place called Ramar Padam near Vedaranyam. According to a Tamil legend, the Vedas locked the gates of the temple after worshiping Shiva. It is believed that sage Agastya witnessed the marriage between Shiva and Parvathi from this temple. As per another legend, a rat in the lamp tickled a ghee lamp, thus expanding the spread of light. Shiva blessed the rat and it was born as king Mahabali in its next birth. The Asvanis Nachiketa and Svetaketu performed tapas in this place.