The temple has contributions from the Pallavas, Nagars and Cholas during the 8th, 9th and 10th centuries. The Thanjavur Naikars and the Maratha rulers were ardent patrons of the temple and contributed significantly to expanding the temple. During the rule of the Nayaks, Nagapattinam was a busy port and a Dutch territory. The lamp which was lit in the main gopuram was said to be so bright that it acted as a light house for the ships sailing in this region. Kundo Pandithar, an officer in the Nayak kingdom in 1737 is believed to have constructed the Asthana mantapa, shrines of Pachai Varnar, Pavala Vannar, Veetriruntha Perumal, Kidantha Kola Perumal and Vishwaksena.
The temple faces the east and at the entrance of the temple, there is a four pillared open hall. The temple has a magnificently carved 90 ft. (27 m) tall rajagopuram (temple tower) and is enclosed by rectangular walls around it. There is a smaller temple tower on the western side. General Jagul Nayakar, the lieutenant of the Nayak king during the 1650s was a staunch devotee of Soundararaja Perumal. He is believed to have built the temple tower, halls and the compound wall around the temple. The image of him and his wife Lakshmi Ammal are installed in one of the halls built by them. The walls of the temple are surrounded by large streets called mada vedhi or the streets where the servants of the Lord only are allowed to reside on. It is on this street that the temple chariot passes during festivals. The southern street accommodates the station of the temple chariot and Sarapushkarani, the temple tank.
The consort of the Lord here is called Soundaravalli Thayar, or the eternal mother of matchless beauty. There is a four-pillared mantapa with Deepalakshmis in front of the Soundarvalli shrine, which has beautiful stone carvings of gods and goddess. Garuda is seen in a sitting posture in this temple in his usual position near the flag mast. Usually the guard is seen in a standing position but in this temple there is an exception.
There is a very unusual and beautiful Narasimha temple inside the main temple complex here. The Narasimha Deity is seen with eight hands – one blessing Prahlada, another in abhaya mudra (blessing pose) and the others killing the demon Hiranyakashipu. Many lilas from the Mahabharata and Ramayana are depicted here. The hall has the figurine of the architects who designed it. The Nayaka mantapa is built like a chariot with wheels outside it.
There are inscriptions from various ruling empires on the contributions made to the maintenance of the temple. The mantapa at the entrance to the temple has two eight foot sculptures of the guardian deities Sumba and Nikumba.
In the main sanctorum beneath the sundara vimana , we find the matchlessly attractive Soundararaja Perumal with His consorts Sridevi and Bhoodevi. The festival Deity, Nagai Azhagiyar (the beauty of Nagai town) is of remarkable beauty. The Lord can be seen in three different poses here – standing, lying and sitting posture and He is said to have given darshana in each of these three postures to Naga Raja. Here Neelamegha Perumal is in standing posture whereas Govindaraja Perumal is in sitting posture and Ranganatha Perumal is in sleeping posture.
The pastime of this mahakshetra is spread over four yugas. During Sathya yuga, Nagapattinam was a thick forest called Sundararanyam. It is here that Adishesha performed severe penance to be the eternal resident of Vaikuntha to serve the Lord.
Lord Narayana is never separated from His bed — the serpent Adishesha, who accompanies Him even when He advents in His various avataras. When Narayana came to the earth as Rama, Adishesha accompanied Him, appearing as Lakshmana, and his service to the Lord was exemplary. Even when the Lord appeared in His original form of Krishna, He was accompanied by the Adishesha in His original form of Balarama. There is an interesting pastime as to how Adishesha got this special mercy in the process of the creation of this universe that was created by chathur mukha (four headed) Brahma.Sage Kashyapa was the father of the devas, asuras and nagas. Prajapathi Daksha gave his twenty-three daughters in marriage to Kashyapa. From Adithi Agni (fire) and Adithya (sun) were born. Lord Vishnu took incarnation as Vamanadeva as the son the Adithi. With his second wife, Dithi, Kashyapa begot the daithyas like Hiranyakashipu and Hiranyaksha. From his wife Vinata, Kashyapa begot Garuda and Aruna. From Danu he begot the danavas and from Muni he begot the apsaras (celestial dancers of Indraloka or heaven). Kadru begot the 1000 Nagas and the eldest of them is Adishesha.
Most of the brothers of Adishesha were cruel to others; causing fear to others was their favourite sport. They often disturbed Garuda, the eagle carrier of Vishnu. This caused the perpetual enimity between the eagles and the snakes. Adishesha was very disturbed with the behaviour of his brothers and decided, in frustration, to perform severe penance. He meditated in different places like Gokarna, Badrinath, Pushkar and the Himalayalas, praying ardently to Lord Brahma. Brahma, satisfied with his penances, granted Shesha a boon. Seeing the determination and unshakable faith of Adishesha, Brahma then asked a favour of Shesha – to go beneath the unstable earth and stabilize it. Shesha agreed and went to the netherworld, and stabilized her with his hood. He is known to support mother earth even today, thus making Patala his perennial residence. Adishesha then asked for salvation. Brahma replied that the power of granting moksha or salvation is in the hands of the Supreme Lord Vishnu alone. To this end, Brahma asked Adishesha to proceed to Sundararanyam forests and perform severe penance to Vishnu. Accordingly Adishesha came down to Sundararanyam and performed severe penance to Lord Vishnu. The Supreme Lord appeared before Adishesha and blessed him, granting him a boon. Adishesha expressed his desire to be the bed of Vishnu. The ever merciful Lord immediately agreed to this plea, and decided to lie on the coils of Adishesha. Thus Adishesha began his selfless service to the Lord at all times. Hence, this place has been named Thirunagai or Nagapattinam (naga means snake). The lord who appeared in the Sundararanyam forest was known as Soundararaja Perumal.
From this time, Adishesha became a nithyasuri or eternal resident of Vaikuntha. He serves the Divine Couple Vishnu and Mahalakshmi at all places, at all times and in all forms, religiously. Adishesha possesses intuitive, telepathic form of understanding the Lord’s desires at all times and enables himself suitably to be of service to the Lord. When the Lord stands, the mighty serpent Adishesha becomes the canopy above. When the Lord is seated, the serpent coils up into a regal throne with an umbrella-like hood. The numerous gems encrusted in his hoods shed a radiant glow that illuminates the chamber and gives radiance to the Supreme Lord who is self-illuminated. This very sight of the Lord is simply magnificent and so opulent that words run short to describe His beauty. When the Lord walks, Adishesha becomes a pair of sandals and gently covers the holy feet. When the Lord reclines, the serpent turns into a cool, plush, silky, soft, luxurious and fragrant bed. When the Lord reclines on Adishesha, the latter’s breathing is like the gentle rocking of a cradle, moving up and down when he exhales and inhales.
Adishesha enjoys the unique privilege of observing the transcendental infinite attributes and the auspicious glory of the Divine Couple Vishnu and Lakshmi, from close quarters. Perhaps none of the servants of the Lord have got this rare divine opportunity. These experiences fill his heart and overflow in the form of words of praise, gushing constantly through his thousand mouths studded with manikya gems. Adishesha was perfectly aware that this boundless joy can surely not be sung with a single mouth. He is endowed with boundless knowledge, wisdom and strength. Rather the Supreme Lord bestowed him with enough strength to bear His divine body. The mighty Adishesha’s intense devotion to the Lord makes him anxious about the Lord’s safety and welfare. Adishesha is well aware that the Lord is the Supreme Personality of Godhead who protects the entire universe. Yet out of his vatsalya rasa he is very eager about the safety of the Lord. When the Lord was carried by Vasudeva from the prison in Mathura to Gokula, as a baby, Adishesha promptly came and spread his hood to protect the Lord from the stormy torrential rainfall, even though Adishesha was perfectly aware that these rains would not affect the Lord in anyway. Adishesha is always eager to serve the Lord. He knows that bhakti is anukulyena or unconditioned, and that the Lord can be won and pleased only by such bhakti.
When the Supreme Lord incarnated as Vamana, a dwarf brahmana, in Tretha yuga, Adishesha had a wonderful role in the pastime. Vamana came to Maharaja Bali and asked for three paces of land, which the king agreed to grant Him. Vamana then grew into the cosmic Thrivikrama, spanned the three worlds in two steps and took them away from Maharaja Bali. He then kept the third pace on the head of Bali Maharaja. Seeing this amazing sight, all the 33 million demigods began chanting the holy names of the Lord. The Gandharvas played 18 million types of musical instruments. This loud humming in chorus reached Vaikuntha, and, eventually, the ears of Adishesha. Adishesha, mistaking the resounding chant to be some threat to the Lord, hissed and spat poisonous fumes from his mouths. Such is the care and devotion of the nithya suri Adishesha. As such Adishesha is the greatest devotee of the Supreme Lord. This great devotee is ever present to serve the Lord in this temple of Thirunagai.
In Thretha yuga, there was another great devotee who was granted darshana by the Supreme Lord – the illustrious son of Maharaja Utanapada whose name was Dhruva. His story is closely connected with this temple. One day while Uttanapada played with his favourite queen. Suruchi’s son, Dhruva, the older queen’s son, wanted to sit on his father’s lap too. But the cruel Suruchi reprimanded Dhruva and said, “My son is Uttama, the crown prince, and I am the favorite queen of the king. No one has the right to ascend the throne of the king to even sit on his lap, unless they are born of my womb.” Dhruva who was very much hurt by these harsh words, looked to his father who said nothing. Dhruva then ran to his own mother Suniti, trembling with disappointment. Suniti advised her son to worship the Lord with austerities and so the boy went to the forest.
Dhruva was determined to seek his rightful place and performed very severe austerities to achieve this. Noticing the young prince’s resolve, the divine sage Narada appeared before him and tried to discourage him. But Dhruva's fierce determination knew no bounds, and the astonished sage guided him towards his goal by asking him to go to Thirunagai. Narada Muni instructed Dhruva to chant om namo bhagavate vasudevaya. Dhruva started his penance, and went without food and water for six months, his mind fixed on the transcendental name of the Lord. The Lord was very pleased to see the great resolve of the five year old so He appeared before him immediately. But he could not utter a single word to glorify the Lord. He was spell bound by the bewitching beauty of the Supreme Lord.
The Lord touched the boy’s right cheek with His divine conch and the boy poured forth a beautiful poem of praise of the Lord in twelve powerful verses, which together are called Dhruva-stuti.
This pastime is said to have taken place in this divya desam, according to the Brahmanda Purana.
The temple had contributions from Pallavas, Nagars and Cholas during the 8th to 10th centuries. During the later centuries, Thanjavur Nayaks and subsequently the Thanjavur Marathas are believed to have made significant contributions to the temple. During the rule of Nayaks, Nagapattinam was a busy port and it was more of a Dutch territory. On the request of Dutch for a light house, the Nayak king is believed to built the seven tiered temple tower and utilized it as the light house. Jagul Nayakar, the lietuant of Nayak king during the 1650s was a stauch worshipper of Soundararaja Perumal. He is believed to have built the temple tower, halls and the compound wall around the temple.
The image of him and his wife Lakshmi Ammal are installed in one of the halls built by them. Kundo Pandithar, an officer in Nayak kingdom during 1737 is believed to have constructed the Ashtana Mandap, shrines of Pachai Varnar, Pavala Vannar, Veetriruntha Perumal, Kidantha Kola Perumal and Vishwaksenar shrines. During the early 20th century, Dratcha Balagurumuthi Chettiyar built the Bhakthiula hall, Chinnaya Chettiyar rebuilt the Vasantha hall, Nachiyappa Pillai rebuilt the Mataipalli, Ramasami Pillai renovated the image of the presiding shrine and the citizens of the town contributed to various other renovations. There are inscriptions from various ruling empires on the contributions made to the maintenance of the temple