Avudaiyarkoil was earlier known as "Thiruperunthurai" (meaning, the biggest Harbour).
The presiding deity in this temple is Lord Shiva (Atmanadhar). It is one among the 275 Paadal Petra Sthalam (Temples sung by 64 Nayanmars). Manikavasagar was one of the four important Tamil saints of Saivism (Lord Shiva worship) out of 63 Nayanmars (63 important saints of Shiva). We can see the idols of all the 63 saints in most of the Shiva temples in South India. Four saints among them are in separate shrines or in a higher platform in some temples who were called as Nalvar (Important four). Manikavasagar is one of them.
Avudaiyarkoil temple is connected to the history of Saint Manikavasagar. The King Arimardhana Pandian of Madurai asked his minister Thiruvadhavoorar to buy horses and gave him money. The minister came to the place named Perunthurai to buy horses. He heard the chanting of Shiva agamas. On searching, He found a saint seated beneath a Kurungai tree. He then requested the saint to initiate him into divine wisdom. The saint did so and vanished.
Manikkavasagar concluded that the Lord Shiva himself had come to help him. So he built a temple for the Lord here. He used the money given by the king for buying horses. Once the king came to know of this, he put the minister in prison. Lord shiva assumed the form of a horse trader and converted all the foxes in the forest to horses and handed over them to the king. But in the night, all the horses got converted back to foxes. The king did not release the minster because of this. Furious over the treatment meted to his devotee, the Lord brought flash floods to the Vaigai River. The king then ordered people from each house to come to the river for building embankments. There was one old woman who due to old age could not go. Lord Shiva took a human form and went on behalf of the old woman. Instead of helping the people in building the embankments he slept off. The enraged king, hit him with a stick. The hit was felt by all human beings including the king. The king sensed the divine intervention and asked the Lord for his apology. After this incident, the saint Manikkavasagar, renounced the ministerial life and became an ascetic and spent the rest of his life in the propagation of shaivism. He wrote the famous "Thiruvasagam" in Avudayaur Koil temple. The immense output of mystical experience reached its climax in the Tiruvachakam. Anyone reading it could not but feel the wonderful beauty and pathos and love that permeates these verses. When reciting in private or public, tears would gush in our eyes. There is a common saying that "Those hearts melted not to Thiruvasagam would melt to no other Vasagam".
In times past, a Pandya king brought 300 priests from Benares to attend the temple services here and to honor them he wanted to present gold brocade shawls to them. While distributing he found one in excess and he searched for that priest in the crowd. An aged priest came forward and claimed that robe. On the next day, the king was astonished to find that garment, wrapped round the deity. Atmanadha was the priest who claimed that excess robe.
The king had given the priests lands of sustenance. But in later days a Kurumba chief Lundakshan seized those lands by might. The then reigning king wanted some proof to show that the land belonged to the priests. At that distance of time, no papers were available. Lundakshan merrily remarked that the proof that the land was his say in his intimate knowledge of the land, "Even if you dig to the length of a palm tree, you won't get a drop of water" he said. Just then an aged priest came forward and struck the earth with a crow bar. In the first stroke itself water gushed out. The king restored the land to the priests. It is needless to say that the aged priest was none else but Atmanadha.