Legend has it that in the region where the temple now stands, there was once a king named Viroacha who had no children due to his past misdeeds. He prayed at the Kailasanathar Temple in Kanchipuram, where Lord Shiva granted him a boon: the gatekeepers of the Vishnu temple would be born as his sons. Pallavan and Vallavan were born to him, both deeply devoted to Vishnu. They conducted the Ashwamedha Yagna for their kingdom's welfare, during which Vishnu appeared in his divine form as "Paramapadha – Sri Vaikuntanathan," hence the name Vaikunta Perumal Temple. This story also teaches us about the importance of harmony between different faiths, as the king's prayers to Shiva resulted in the birth of devout Vishnu devotees, highlighting the unity among all gods and the need for mutual respect among believers.