
According to legends, once, Saga Narada, after paying his respects to Lord Vishnu, left Vaikuntam to Satyalokam to see Lord Brahma. Enraptured by the melodious tunes of Narada, Lord Vishnu also followed him. When Narada reached Satyaalokam, Brahma saw Vishnu along with his son Narada. Brahma stood up in reverence and prostrated before Lord Vishnu. Vishnu, soon came to his senses and having realised that he is in Satyaloka, disappeared in a flash. Prajapathis, who were present at Satyalokam, thought that Lord Brahma is revering his own son Narada, as they didn't see Lord Vishnu, laughed in a displeasing manner.
The prajapathis who were laughing were cursed by Lord Brahma that they would be born on Earth and would suffer the miseries of the human beings. Sage Narada advised them to perform a penance at a place he himself would select for them. Sage Narada threw his ‘Valkalam' (an upper garment) into the air and it fell onto the Earth and onto a branch of a huge banyan tree. Prajapathis decided to start their meditation on the shadows of that tree. Lord Vishnu ordered Sudarsana moorthy to dig a pond near to the place where Prajapathis were meditating to provide them with water and hence 'Chakratheertham' was formed.
Lord Brahma also did a 'Maha Yanja' at Varkala and the remnants of the Yaga became the 'Papanashinitheertham'. The idol consecrated by Lord Brahma and the temple constructed by the Prajapathis were taken by the sea. One day, a Pandya King, who had killed a Brahmin, came near the Varkala Seashore. He wanted to expiate his great sin. After hearing about Janardhana swami, the King did penance at the seashore. One night, Janardhana Swami appeared in his dream and told him that the King would get an idol from the Sea and should consecrate it. King collected the idol from the sea and examined it thoroughly. He found that the hand in which the idol holds 'Chakra' was seen broken. He covered the crack with gold plates and did the consecration. He also constructed a temple at that very spot and is the one that we see now.

The temple of Janardana Swami is a fine example of Kerala style of architecture. The circular Sanctum sanctorum is surmounted by a conical dome of copper sheets. The Namaskara mandapa is embellished with beautiful wooden carvings of Navagrahas(Nine planets) on the ceiling and the roof of which is copper-plated. The quadrangular enclosures (prakaram) around them and a hall containing a ‘balipeetam' in front of the inner temple are also characteristic features of Kerala style of architecture. One of the inscriptions indicates that the temple was renovated during the reign of Her Highness Umayamma Rani, who ruled during 1677-84 AD.
The main idol has a striking appearance with four divine arms having all the attributes of Lord Vishnu. It is the most important shrine dedicated to Lord Vishnu as 'Janardhana' in Kerala. In the south-western corner and on the north-eastern side of the outer enclosure are the shrines of Shasta and Shiva(with his vehicle, Nandi) respectively. Both shrines are said to be older than the main shrine. At the Shiva's shrine, one could see a gopuram constructed in the Tamil style of architecture. Nearby this, Serpent Gods are also seen worshipped. On the six pillars of the Balikkalpura, one could see carvings of Nataraja, Ardhanareeswara, Kamadeva, Rathi, Venugopala and Bhairava.
The idol on the main sanctum, of Janardhana Swami, is made of 'Krishnashila'. The Lord here is worshipped as Janardhanan in the morning, Narasimham at noon, Venugopalan in the evening and as Mohini at night. Another specialty is that cooking is done here on two thidapallies (temple-kitchen) daily.
It is believed that Sri Adikesava Perumal of Thiruvattar, Sri Padmanabha Swami of Trivandrum and Sri Janardhana Swami of Varkala are brothers of which Adikesava Perumal is the eldest and Janardhana Swami the youngest. It is also said that the line of sight of the three idols of these temples coincides.
A tamil inscription assigned to 1252 AD is engraved on the southern base of the central shrine. The main festival which lasts for ten days falls on the month of Meenam. On the Thiruvonam day of each month, Janardhana Swamy is taken out in procession around the temple upon his vehicle, Garuda. Performing last rites is considered sacred in this temple. The temple, premises and the beach will turn into a cynosure of lakhs of devotees who throng the temple on the day of 'Karkidakavavu' for performing Vavu Bali'.