Early in 12th century, the great Srivaishnava saint Sri Ramanujacharya took up his residence and lived here for about 14 years. It thus became a prominent centre of the Srivaishnava sect of Brahmins, who obtained from the Hoysala king Vishnuvardhana, who had become a follower of the Acharya, an assignment of the fertile tracts of land in the neighbourhood, especially of the Ashta Gramas, on either bank of the Cauvery.
In the 14th century, the place suffered at the hands of Muslim invaders, who wrecked Dwarasamudra and it was at Tondanur(Tonnur) at the southern foot of the hills, that the Hoysala king at first retired. It was subsequently restored, in about 1460, by Thimmanna Dannayaka, a chief of Nagamangala, who was an army commander of the Vijayanagar king Mallikarjuna or Immadi Prudhadeva Raya. The buildings must have been on a grand scale, as can be seen from the remains of the Gopal Raya gate on the South which are of immense proportions. The Brahmins deserted Melkote which was then plundered.
The principal temple is a square building of large dimensions but very plain, dedicated to Lord Cheluva-Narayana Swamy or Tirunarayana. The utsavamurthi, which is a metallic image, representing the deity which is called Cheluvapille Raya or Cheluvanarayana Swamy whose original name appears to have been Ramapriya. According to a legend, this metallic image was lost and was recovered by Sri Ramanujacharya. The annual report of the Mysore Archeaelogical Department states on the strength of epigraphic evidence, that the presiding deity of this temple was alerady a well known object of worship before Sri Ramanujacharya worshipped at the shrine in December 1098 CE. and even before he came to the Mysore region and that very probably he used his influence to rebuild or renovate the temple. From the lithic records of the period, existence of Tamil influence and Vaishnava worship in the area are also evident.
The temple is richly endowed having been under the special patronage of the Mysore Rajas, and has a most valuable collection of jewels. As early as 1614, the Mysore king Raja Wodeyar 1578 - 1617 who first acquired Srirangapatna and adopted the Srivaishnava faith, handed over to the temple and the Brahmins at Melkote, the estate granted to him by Vijaynagar king Venkatapati Raya. On one of the pillars of navaranga of the Narayanaswami temple is a bas relief about one and a half feet high, of Raja Wodeyar, standing with folded hands, with the name inscribed on the base. He was said to be a great devotee of the presiding deity and a constant visitor to the temple. A gold crown set with precious jewels was presented by him to the temple. This crown is known as the Raja-mudi after his name. A legend says that on the day of his death, he was observed entering the sanctum and was seen no more after wards. From the inscriptions on some of the gold jewels and on gold and silver vessels in the temple it is learnt that they were presents from Krishnaraja Wodeyar III and his queens. Krishnaraja Wodeyar III also presented to the temple a crown set with precious jewels. It is known after him as Krishnaraja-mudi. Vairamudi or Vajramukuta, another crown of great value, seems to be older than Raja-mudi and Krishnaraja-mudi and it is not known as to who gave it to the temple. All the three crowns are kept in the safe custody of the Government and brought to the temple on specific annual occasion for adoring the image of Cheluvanarayana Swamy. The vairamudi festival, which is the chief annual celebration is attended by more than 400,000 people.