Legends
It is said that the land where now the temple exists, was a marshy and muddy area known as "Nalliswara Madham Vayal".A great yogi worshipped there for years and several divine rituals were performed at that time. It is also believed that centuries ago a temple named "Naalliswara Kshetram" existed there. According to the "Deva Prashnam" conducted in the temple premises in the year 1977, it is recorded as follows:- 'From the ancient time, thousands of years back, a great temple famous for it's royal heritage in keeping the customs and divine rituals, existed here. The temple was very prosperous and well supported by a cultured human race , famous ascetics , 'yatheeswaras', royal families,and many politically, economically and socially prominent personalities'. May be this led Sreenarayana Guru,with his clairvoyance, to choose this land to construct the temple.
Myth
Based on archeological findings from Mohanjadaro and Harappa,there is evidence that about 15,000 years back, there lived a population that worshipped Lord Shiva. A piece of pottery from the findings had a picture engraved on it of a yogi in the meditating posture surrounded by living creatures like human beings on either sides ,birds flying ,animals and fishes,all eagerly listening to Him as if to acquire spiritual wisdom.. Methodologically, Lord Shiva in the form of Dakshinamoorthi is considered as the first Guru of Bhaaratham. As a young ascetic, sitting under a pipal tree, facing southwards, he used to preach to his disciples in the language of 'silence'.

Later, the ancient belief, 'Shiva Guru Sankalpa' was developed to 'Dakshinamoorthi sankalpa' by Sree Shankaracharya and Sreenarayana Guru Devan . In a verse by Sree Shankaracharya, you can see all the poems ending with 'Nama idam Dakshinamoorthaye' (we praise Lord Dakshinamoorthy). The same concept is explained beautifully in another book written by Sreenarayana Guru.

Another myth of Lord Shiva is regarding 'Natarajan' (the king of dances). According to Hindava belief, Lord Shiva is the god of dances and the universe is his stage. It is said in the ancient books that the art of dance was found by Lord Shiva. He taught it to his favorite disciple Thandu(an ascetic) and his wife Parvathi. Thandu's style of dancing became popular as 'Thandavam' and Parvathy's as Lasyanrithum'. The combination of Shiva's Thandavam and Parvathy's Lasya nrutham which is known as 'Ardhanareeswaran' is very popular among Indians. The statue of 'Nataraja' in the Chithambara Temple (South India), is a perfect replica of the Nataraja Sankalpa'. Decked in beautiful ornaments ,this statue has four hands. You can see a snake holding its head upward, a skeleton head, Goddess Ganga and a crescent decorated with a garland made of 'Konna' leaves, on his head. On one of his right hands He holds a dhamaru (a rhythm instrument) and shows 'abhayamudra' with the other .One of the left hands has glowing fire and the other hand points downwards. His right leg is placed on an ugly creature. He is standing on a lotus from which fire flames reach up to his hands holding fire and dhamaru. This 'prapanchanadanam' (Cosmic Dance) represents the creations and its movements in the universe. Each mudra and the objects in his hands represent the creation, the operation and the destruction. The ugly creature under his foot represents the ego. It is said that, the the 'moksham '(freedom of soul) is possible only by removing the ego from your mind.

It was also found by the archeologists, that Lord Shiva was worshipped in the form of 'Shivalingam'. In this concept the temple itself is a human body and the 'Sreekovil'(the inner most room of the temple, where the idol is placed) is the heart. The Shivalingam installed in the sreekovil is a symbol of the divine nature of the soul.