According to legend, there was an affluent devotee who also wished to partake in religious endeavour of serving Ranganatha. Some of those who worked under him exploited his bhakti to their advantage and swindled all his money, making him penniless.
Pleased with his devotion, Vishnu appeared in his dream and promised to help him out of the situation. He instructed the devotee to bring along a marakkal and his workers, who cheated him, to the bank of the Kollidam, where he promised to pay the workers their dues.
The Lord, in the guise of an old man, gave each of them a measure of sand from the bank of Kollidam according to the work done by them.
Gopuram of the temple
Much to their surprise, it turned into precious stones for those who toiled and it stayed the same for those who shirked work. The workers who did not get anything were enraged and started chasing the old man. At this juncture, the Lord appeared in his original form and made the workers realize their mistakes
It is also believed that the presiding deity appeared for Kamadhenu, the holy cow and also for Thirumangai Azhwar, the saint poet of 8th century.
As per another legend, the celestial deities Indra and Agni worshiped Vishnu at this place. Indra once insulted the sage Bhrigu when he placed the divine garland offered to him on his elephant Airavata. Bhrigu cursed him to lose all the powers. Indra did severe penance in the place to regain the powers.
Agni, the fire god, was affected with Brahmahatha Dosha, a curse inflicted on account of burning the head of Brahma handed over by Shiva. He was propitiated off his curse by offering worship at this temple.