As per the first legend, in Satya Yuga there lived a person belonging to very high caste – a learned pundit. During his life time he committed numerous sins even though he belonged to learned Brahmin class. He was so greedy that he had never paid a penny in the name of charity. He was so cruel minded that once when a poor Brahmin came to him seeking alms, he not only insulted him but also beat him black and blue due to which the poor Brahmin died. Not content with his death, the cruel minded pundit tied a rope on the dead body, dragged it several miles away and abandoned it in a isolated place and came back. Everyone thought that the cruel pundit will end up only in the torture chamber in Yama Loga. However, on the other side the pundit was an ardent devotee of Lord Shiva and always kept on chanting the name of Lord Shiva, even as he indulged in the act of sins. During death bed he continued to chant the name of Lord Shiva and therefore after he died, Shiva Ganas came to Thiruvisanallur to take away the dead soul to Shiva Loga, a rare honour Lord Shiva's devotees get.
But in the meantime the Yama ganas too came running to take him to torture chamber in Yama loga for the sins committed by him including the brahmahathi dosha attained on killing a poor Brahmin. When both group of Ganas wanted to take the soul of the cruel pundit to their respective logas, fight erupted between them and Shiva Ganas drove away Yama Ganas. Yama Ganas went to Lord Yama and narrated him of their ordeal at the hands of Shiva Ganas. The angry Lord of death came running to Thiruvisanallur and began attacking Shiva Ganas. Unable to match the strength of Lord of death, Siva Ganas ran to Lord Shiva’s carrier vehicle Divine bull Nandi Deva seeking protection. Seeing the ordeal of Shiva Ganas, angered divine bull Nandi Deva ran behind Lord Yama and blocked his passage taking the soul of Lord Shiva’s devotee to Yama Loga. In the fierce fight that ensued divine bull Nandi Deva hit Lord Yamaraj so hard that Lord Yama fell on ground and fainted. Anger not subsiding divine bull Nandi Deva began to crush the Lord of death him under his toe.
Deva ganas who were witnessing the terrific fight from a distance realized that Lord Yama may die and it will lead to chaos as none will die thereafter and universe will be filled with more and more souls ultimately strangulating the universe to perish. They rushed to Lord Shiva and pleaded for mercy to save Lord of death from the clutches of Divine bull Nandi Deva. Compassionate Lord rushed to the site, cooled down the temper of Divine bull Nandi Deva and got the Lord of death getting crushed under Divine bull Nandi Deva’s toe released.
There is a another legend associated with the temple. Once due to a curse Lord Brahma had to born as a son of a Yogi in Bhoologa. The Yogi always travelled with six of his disciples wherever he went. As per another legend the disciples were also born along with Lord Brahma as sons of the Yogi who was an ardent Shiva Baktha. One day the Yogi along with his disciples sat on a severe penance seeking direct darshan (appearance) of Lord Shiva. Due to the intensity of the tapas which generated enormous heat, people began to suffer and die in the universe. Unable to bear the heat the Deva ganas too prayed to Lord Shiva to save the universe from getting annihilated. Compassionate Lord asked the Ganges over his head to flow over them to douse the heat in the universe. Simultaneously the Lord appeared before them in fulfilment of their prayer and merged all of them into him by converting them as seven lights. Thereafter Lord Shiva enshrined himself as Shiva Linga in the same spot (where the present temple exists). As a proof of their merger into him, seven hair lock like appearance can be seen over the Shiva Ling enshrined in that temple. Hence, the deity came to be called Siva yogi Naathar i.e. custodian of his devotees who were Yogis. The greatest sage of sages Agasthya Muni witnessed the entire drama which had unfolded there.
Lord Shiva assured them that he would in future be worshipped as Puraathanaeswar in Satya Yuga, Vilvaraneswarar in Thretha Yuga, Yoganandeeswarar in Dwapar Yuga and Sivayoginathar in Kali Yuga. Since the entire events happened in Satya Yuga, the first of the Yugas, this temple is believed to be most sacred amongst the temples as it has lived through all the four yugas.
Lord Shiva manifested in the temple there and declared that since Divine bull Nandi deva saved even a sinned soul from the clutches of Yama Ganas, those whose Zodiac is bull (Rishaba Rasi) when they visit this temple and offer prayers their past sins will get wiped out. Thus the temple came to be viewed as Pariharasthal (sacred place where the sins are condoned) for those whose Zodiac sign is bull (Rishaba). Praying here will also wipes away the death related fears from mind.
In this temple Divine bull Nandi’s head can be seen slightly tilted instead of remaining straight and there is a folklore about on this. The cruel pundit before meeting with death realized that his death was nearing in another few moments. He was aware that Lord Shiva used to visit the present temple site for rest in invisible form. His carrier vehicle sacred bull Nandi deva used to visit the site and clean up the place before the Lord comes there for rest. At the end of his life when the pundit saw fearsome Yama Ganas rushing to him to drag him to the torture chamber, screaming for pardon he ran towards the place where Lord Shiva used to rest in invisible form. As he continued running he was chanting Lord Shiva....Lord Shiva and died on way before reaching the spot after which only the events as narrated under first legend happened.
When Divine bull Nandi Deva heard the scream of the pundit he turned towards the direction from where the voice came and seeing Shiva ganas being beaten by Yama ganas, Nandi deva ran to save them. Thus when the temple came up several thousands of years later in the same spot, Lord Shiva manifested in the form of Shiva linga with seven hair locks on head and his carrier vehicle Divine bull Nandi Deva too sat there in the form of Nandi, with head slightly tilted facing the direction from where the scream of the pundit came.
As Lord Shiva decided to enshrine himself in the temple along with Divine bull Nandi with tilted head, at the request of Deva Ganas Lord Shiva asked Lord Bhairava, who is his own manifestation to stay there blessing the devotees in the form of Chathurkala Bhairava representing four periods of life - Brahmacharya, Grahastasrama, Vanaprasta and Sanyasa (Lord Shiva himself appears with the said four faces in Pashupathinath Temple in Mandsaur district in Madhya Pradesh). He directed Lord Bhairava to remain in the temple displaying the said four forms. Lord Shiva after transferring his powers to Lord Bhairava, sat by the side of Lord Bhairava in the form of Shiva Ling to guide him and Lord Saniswara was also asked to be present as representative of Lord Yama. Thus this temple gained importance on account of Chathurkala Bhairava who appears in four forms - Gnana Bhairava who confer education and employment, Swarna Akarshana Bhairava who confer wealth and material gains, Unmatha Bhairava who confers sound health with prosperity and Yoga Bhairava who confers Moksha respectively - in each of the four yugas. Since Lord Bhairava was given prominence in the temple as per the directives of Lord Shiva, the shrine is dedicated to Chathur Kala Bhairava who appears with four forms facing west.
Another interesting aspect is found here. In any Shaivite temple the Flag post of the temple will be behind the Divine Bull Nandi Deva who sits facing the presiding deity Lord Shiva. Contrary to it the Divine Bull Nandi deva is seen sitting before one could reach the Flag post. The pundit said that the Divine Bull desired to sit in the same place from where he looked back at the scream of the pundit who came running seeking asylum. Since there are stipulations in Shilpa shastra as to where and at what distance from the sanctum the Flag post has to be installed, the flag post in this temple could not be placed behind Divine Bull Nandi deva.
The temple has many uniqueness. Near the southern end of the temple wall is a solar based clock opposite to the sanctum of Goddess Soundarya Nayagi. It is stated that the unique clock based on astronomical science has been established by one of the Kings from Chola dynasty some 700 years ago. The clock is in the form of a semi circle showing digits 6 to 6 from one end to the other to measure the route of Sun. As the sun rays fall on a small rod installed in the centre of the clock, the shadow falls from it to show the exact time on the clock.
Unlike many Shiva temples where Lord Vishnu appears appears alone in separate sanctum, here in this temple Lord Vishnu appears in the form of Lakshmi Narayana with his spouse Lakshmi devi by his side. The folklore tells that both Lord Vishnu and Goddess Lakshmi came here before their marriage and worshipped Lord Shiva seeking his grace for their marriage. The belief is that when they are worshipped on Ekadasi days or Saturdays the childless couple will be blessed with progeny.
One of the lores connects the story of Ramayana with this temple. It says that when divine bird Jadayu fought with Ravan to get Goddess Sita released from his clutches, one of the feathers of the divine bird fell here causing a heavy flash of water sprang from the ground. As a result a water tank appeared and was thus named Jadayu Theertham.