Lord Parasurama, the sixth avatar of Lord Vishnu, assassinated all Kshatriya clans 21 times with his axe, as a revenge of killing his father, sage Jamadagni (Jamadagni was killed by the sons of the evil king Kartavirya Arjuna, as a revenge to Parasurama who assassinated their father). But after that, he was very sad for doing such act as a revenge, and thus he gave all the land he acquired to holy Brahmins. But, some of them were against Parasurama as he massacred thousands of Kshatriyas. After that, he made his own land by throwing his axe to the sea. That land came to be known as Kerala, as it was filled with Kera (Coconut trees), Parasurama gave this land to Brahmins, and made 108 Shiva temples, 108 Durga temples and 5 Sastha temples to them for worship. Later, he went to meditation.
But still, he was not happy. One day, while he was meditating, the ghosts of the Kshatriyas assassinated by Parasurama appeared before him and asked him to give salvation. They also told that if they will not get salvation, they will cause huge problems to the people. After that, he began to pray Lord Vishnu. While praying, he heard a message, which stated that Lord Shiva has reached Vilwadri (Sanskritised version of Thiruvilwamala) with his full family and guards and he should reach there immediately. Parasurama immediately proceeded to Vilwadri. Lord Shiva presented him and idol of Lord Vishnu, and told that he worshiped that idol in Kailasa. Parasurama found a very suitable place nearby and consecrated the idol there, in a manner of getting darshan for the ghosts.
Around the same time, a sage named Amalaka, the son of sage Kashyapa, conducted huge penance praising Lord Vishnu on the same spot. It is believed that Amalaka got this name by eating only amla (gooseberry) fruit. When he was doing penance, the devas (gods) believed that he had wish on taking heaven away from them. They sent heavenly damsels and made blasts near him, but he never woke up. When they complained Kashyapa about this incident, he told that his son was not interested in any worldly pleasure. Then, the asuras (demons) had problem. They all came in a row to break Amalaka’s penance. Amalaka opened his eyes. Fire smashed out of them. The asuras all got burnt and together they became a huge rock, called ‘Rakshasappara’. Amalaka continued his penance and Lord Vishnu appeared before him with his consorts Sri and Bhumi, and his bed Ananta as umbrella. He told his wish that the Lord should remain there for the well-being of the worldly people. Thus, the Lord turned himself into a swayambhu idol, with his consorts and Ananta.
After both the idols were consecrated, the power of Lord Vishnu spread throughout the village. Hearing this, the asuras became again furious. They sent one of them to destroy those idols. He went in the form of a holy Brahmin. During those days, Brahmins in the temple were fed twice a day. This asura also joined them. During the daytime, he remained like a normal Brahmin, but during night time, he changed his form. After that, he began to eat the cows donated to the temple and threw their bones northwards. Thus, the place came to be known as ‘moorikkunnu’ (moori means cattle and kunnu means hill in Malayalam). He also ate some sleeping Brahmins. But no one knew the real killer, as there is no any carnivorous creature nearby. People thought it is any ghost who is eating the cows. Finally, the 11th day (Ekadasi) in the dark fortnight of the month of Kumbham (February-March) arrived. The asura considered that time the most suitable to fulfill his task. One midnight, after all poojas were completed and everybody slept, the asura entered the sreekovil by destroying the pillars. At that time, Lord Vishnu appeared from one of the pillar in the form of Narasimha, his fourth avatar, and killed the asura in the same manner he killed Hiranyakashipu. After hearing the thundering sound made by the asura, all people woke up and rushed to see what happened. After seeing the ferocious form of the Lord, many people fainted. Some people prostrated on the ground and chanted the names of the Lord. They did not have the courage to look upon the ferocious form of the Lord. At that time, sage Amalaka came there and chanted the names of the Lord. After that, the Lord came back to his original form, and blessed his devotees. To prevent from further attacks, some power of Lord Shiva was also disposed in the idol, thus a concept of Lord Shankaranarayana also appeared. Even on special days associated with Lord Shiva, like Mahashivaratri, Pradosha vrata and Mondays, many people visit Thiruvilwamala Temple.
The temple is situated on the exact center of Thiruvilwamala village, situated on the top of a hill 100 ft above the sea level. On every side except the east, there is some population. The main gate to the temple is from the west. There are more than 50 steps to reach the temple. Bharathappuzha, one of the major rivers in Kerala, flows 3 km away from the temple on the north side, and as the temple is situated on the top of a hill, the river can be clearly seen while looking downwards from the temple. On the west and east sides, there are remains of two huge gopurams, which once got destroyed under mysterious circumstances. There are two idols of Garuda, the mount of Lord Vishnu, on both sides of the main gate. There are many trees on the surroundings of the temple, providing fresh air and lush greenery to the atmosphere. Saraswathikund, the place where sage Amalaka is believed to have did his penance, is to the south of the fleet of steps on the west nada. The place got this name because there is a pit here with presence of Goddess Saraswati. There is a huge peepal tree here, and devotees write ‘Om Harisree Ganapathaye Namah’, the famous mantra chanted during Vidyarambham ceremony, and after that make models of many buildings arranging various stones, bricks, sand and clay. Ramanchira, a small pond, is situated near the entrance to the west nada. Devaswom rest house and cloak room are situated near them. There is no kodimaram (flagstaff) in this temple. The circumambulation path is carved with stone. There are two ‘aanakkottils’ on both the western and eastern sides, both recently built. On the northern side, there is a large pond named ‘Bhagavathichira’, and there are steps proceeding to it. It is in this pond that the priests and devotees take bath before entering the temple. It was under a very pathetic condition for many years, and it was cleaned by devotees and devaswom in 2015. On the north-eastern side, there is a small well, which was also once having the size of Bhagavathichira, and was named ‘Nairchira’. It is from this well that the water for daily poojas is taken. Near to it is an agrasala (auditorium), built as a north-south extension by the rulers of Palakkad, called ‘Edathil Achanmar’, for worshiping the Lord as they could not enter.