In times of yore, Lord Brahma came to the earth to perform a Yaga (fire Sacrifice). He did it in the present Varkala. He was so much immersed in doing Yaga that he forgot his job of creation. Lord Vishnu came to Varkala to remind Lord Brahma about it in the form of a very old man. The Brahmins assisting Lord Brahma, received the old man and gave him food.
But whatever he ate, his hunger was not satiated. Lord Brahma’s assistants went and told him about it. Then Lord Brahma could understand that the guest was Lord Vishnu himself. He immediately came near Lord Vishnu. And found him trying to eat AAbhojanam. Lord Brahma then prevented Lord Vishnu from eating it and told him, "Lord, if you eat it, then the final deluge will swallow this world. " Lord Vishnu then re quested Lord Brahma to stop the Yaga and recommence his job of creation. He also showed him his Viswa roopa, After this one day Sage Narada followed by Lord Vishnu was walking in the sky over Varkala. Lord Brahma who came there saluted Lord Vishnu. The nine prajapathis to whom only sage Narada was visible laughed at Lord Brahma. Because they thought that Lord Brahma was saluting his own son Sage Narada. Then Lord Brahma corrected them. They felt sad at having committed a sinful deed.Lord Brahma told them that the proper place to pray for their redemption would be shown to them by sage Narada. Sage Narada threw the Valkala (deer’s skin) that he was wearing towards the earth. It fell in the present Varkala. The Prajapathis wanted a pond to do the atonement. Sage Narada requested lord Vishnu, who made a pond there; using his Chakra (wheel) The Prajapathis did thapas there and were pardoned for their sins. It is believed that the devas constructed a temple of Lord Vishnu there and were worshipping the Lord Janardhana. But this temple got dilapidated At this time the Pandya king was affected by a ghost. He went on a pilgrimage but no where he was cured. When he came to the present day Varkala, he saw the remnants of a dilapidated temple by the side the sea. He prayed God saying that he would rebuild the temple there. Next day he had a dream. It told him that the next day he should go to the sea and stand near the dilapidated temple. Nearby he would see huge amount of flowers floating in the sea, if he searches there he would get the idol. That idol will not have left hand. He was instructed to make a golden hand and attach it to the idol and build a temple round it. The present Janardhana idol was recovered from the sea by him. He built the temple and laid down the rules for maintenance of the temple. The idol of Janardhana has Aabhojana in its right hand. People believe that over years this hand is raising slowly. The day that the idol is able to eat the aabhojana from his right hand; the world will face the great deluge. . There is an alternate story that Perumal is doing Aaachamanam with this hand. There are small temples of Lord Shiva, Ganapathi, Sastha and Naga Devatha in this temple.The idol is always dressed in sandal and flowers either in the form of Janardhana, Narasimha, Venugopala or Mohini. The rohini star as well as Ashtami thithi of the month of Chingam (August-September) is celebrated as a festival here. On the southern side of the temple two bells are tied. There is a story about it. It seems one dutch ship was passing this way and suddenly the ship refused to move in spite of all efforts. The people told the captain of the ship to tie a bell in the Janardhana temple. It seems the captain and his assistant came ashore and tied the bells.As soon as they tied the bells, the ship it seems started moving. The names inscribed in the bell are Peter von Belson and Michelle evarald. People believe that if worship of ancestors is done in this temple, then they would be pleased.Possibly because of this the Janardhana is also called Pithru Mokshakan.