History of Rajarajeswara temple confirms that this temple was rebuilt in Chola era. This temple was structured and installed in the pre historic age by the mythological characters of Purans times.
Lord Shiva worshiped in this sacred temple is known as Rajarajeswara Temple complex. The word Rajarajeswara means "the Emperor of Emperors" The name signifies the supreme transcendental power of Lord Shiva. The devotees address to Mahadeva with such royal appellations as Perumthrikovilappan, Perum-chelloorappan and Thampuraan Perumthrikkovilappan in Rajarajeswara temple.
The Jyothirlingam in Rajarajeswara temple is vibrant with spiritual power that exerts an enriching influence both on the material and spiritual levels of the earnest devotees. The celebrated ancient sage Agastya is associated with the installation of the Jyothirlingam in the shrine.
The mythological legends of Rajarajeshwara Temple reveal the antiquity and the special significance of Lord Shiva. It is a belief to the visitor of Rajarajeswara temple.
The mythological history of Rajarajeswara temple begins with the visit of the Puranic sage Parashurama, one of the incarnations of Lord Vishnu. Seeing there an ancient shrine of vibrant spiritual power in a dilapidated condition, the sage was grief-stricken and wanted to know the history of Rajarajeswara temple.Thereupon, sage Narada appeared there and related to him the story of Rajarajeswara temple. According to Narada Muni, sage Sanaka and others, the sons of the world creator Lord Brahma, churned the disk of the Sun to lessen its fierce heat. They mimed the dust, which was formed while churning, with the divine nectar of immortality, "Amrita" or Elixir, and out of it gave shape to three spirits and Lord Brahma presented them to Goddess Parvati, the consort of Lord Shiva or Mahadeva.
Goddess Parvati presented these Shiva-lingams to three kings who were doing strong austerities to invoke the Goddess, one in the Threta Yuga and the other two Dwapara Yuga. Maandhatha was the king to whom the Goddess presented the Shiva lingam in the Thretha Yuga, and Muchukundam and Shathasoman were the devotees who received the other two lingams in Dwapara, Third Yuga. Goddess Parvati advised each of them to install the idols in such a place where no death of any creature had taken place or any dead body had fallen.
After a long search for such a place, which was very difficult to locate, Maandhatha, the first one to receive the lingam found out a small place as per that description, only that much land which could accommodate a small plate.
Eventually, the Shiva Lingam was disappeared in the earth and later the king Shathasoman, the one who received the third Shiva lingam was also naturally attracted to the same spot and installed his Shiva lingam there. While installing, this Lingam also began sinking into the earth. King Shathasoman there upon prayed to Sage Agasthya for help. The sage appeared and after lighting a ghee lamp prostrated before the Shiva lingam twelve times; when he begun the thirteenth prostration, the Lingam got firmly fixed on the earth. Therefore the number of prostration the Sage Agasthya performed for his purpose came to be known as twelve and a half. Thus with the installation of the third Shiva lingam has sacred spot became spiritually vibrant threefold. Hearing this incident from Narda, Parashurama and Narada decided to renovate the temple for the welfare of mankind. Later during Chola era, the temple was again renovated for the mass.