This temple is dedicated to Lord Sri Shiva Sri Karayogana Swamy and the goddess is Sri Nilayadhakshi Amman. This is one of the Shakthi peedam. Lord Thiagaraja (Lord Sri Shiva) is known as Sri Sundar Vidanagar. The intricate workmanship of Sri Pancha Mukha Vinayagar seated on a lion is noteworthy. There is also an idol of Lord Sri Saneeshwara who was believed to have been worshipped by king Dasharatha.
Sage Pundarika as advised by Sage Kanwa performed penance on Lord Shiva seeking salvation. Granting His darshan, Lord embraced the sage and granted salvation. As a rule, the soul merges with the Lord attaining salvation. But in this case Lord embraced with the body (Kayam in Tamil) with that of Sage (Aaroganam). Hence Lord is named Kaya (body) Aarogana (embracing) Easwarar-Lord – Kayaroganeswarar. King of serpents prayed to Lord and got a girl child. It had three breasts in birth itself. The king was sad to see this abnormality. Lord Shiva assured the king that one breast will disappear when a king of Surya dynasty visited his place. When king Shalisuhan came there, one breast of the girl disappeared. Happy Naga king gave his daughter to Shalisuhan in marriage. As Naga king worshipped here, the place came to be known as Nagai Karonam. Now it is Nagapattinam.
Vaikasi Wedding festival in May-June; Aadi Pooram in July-August; Shivrathri in February-March; Aipasi Annabishekam in October-November and Tirukarthikai in November-December are the festivals celebrated in the temple.