According to the legends, the idol worshipped here is more than 5000 years old. But there are no historical records to establish it. In the 14th century Tamil literature 'Kokasandesam', references about a place called Kuruvayur is made. As early as 16th century (50 years after the Narayaneeyam was composed) many references are seen about Kuruvayur. In ancient Dravidic, Kuruvai means sea, hence the village on the coast may be called Kuruvayur.
But according to Prof. K V Krishna Iyer (eminent historian), the Brahmins had begun to come and settle at Kodungalloor during the period of Chandra Gupta Maurya ( 321-297 BC). Trikkunavay in the Guruvayur documents is the same as Thrikkanamathilakam or Mathilakam mentioned in the Dutch and British records. And this place was in between Guruvayur and Kodungalloor. Guruvayur was Trikkunavay's subordinate shrine since they were destroyed by the Dutch in 1755. That way Guruvayur must have come into existence before 52 AD. The story of Pandyan King building a shrine here may be a reference to the Azhavars , but they are all silent in their writing about Guruvayur.
It was Melpathur's Narayaneeyam through which the Temple got publicity. The concept of Unnikrishna popularised by Poonthanam , Kururamma , and Villwamangalam brought more and more devotees to Guruvayur.