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.
Mamankam was a very famous event at Thirunavaya, on the bank of Bharathappuzha . The war between the Zamorins and the Raja of Valluvanad of Thirunavaya in a way popularised Guruvayur temple. Due to the prolonged war people across the river bank started preferring Guruvayur. Even the Zamorin become a devotee and thus his subjects followed him completely . The central shrine which we see today is said to have been rebuilt in 1638 AD. Vishwabali was performed later to propitiate all the spirits, good and bad. By the end of 16th century Guruvayur had become most popular pilgrimage centre in Kerala.
In 1716 AD, the Dutch raided Guruvayur. They looted treasures , gold of the flag staff, and set fire to the Western Gopuram. It was later rebuilt in 1747 AD. In 1755AD ,the Dutch in war with the Zamorin destroyed Trikkunavay temple and the Brahmins fled from there. Later the Zamorin become the trustee of both Guruvayur and Trikkunavay, and also their Melkoyma (Sovereign protector).
In 1766 AD , Hyder Ali of Mysore captured Kozhikkode (Calicut) and then Guruvayur. He fined 10,000 fanams to spare the temple . This fine was paid but due to insecurity pilgrims receded , the supply of rice was stopped and the tenants stopped annual dues. On the request of the Malabar Governor, Shrnivasa Rao, Hyder Ali granted a Devadaya (free gift) and the temple was saved from extinction. Again in 1789 AD Tippu Sultan invaded Zamorin's province. Apprehending the destruction, the idol was hidden underground and the Utsava vigraha was taken to Ambalapuzha by Mallisseri Namboodiri and Kakkad othikkan. Tippu destroyed the smaller shrines and set fire to the Temple, but it was saved due to timely rain. Tippu lost to the Zamorin and the English in 1792 AD. The idol hidden underground and the Utsava vigraha were re-installed on September 17th , 1792. But the daily poojas and routines were seriously affected.
The Ullanad Panickers rescued and looked after the temple for good 75 years ( 1825 to 1900). Like Chempakassery Namboodiri and Deshavarma Namboodiri ,the Panickers offered everything from service to property. Thus with their help daily pooja and Utsavam (annual festival ) were once again restored.
From 1859 to 1892, the Chuttambalam,the Vilakkumatam, the Koothambalam and Sastha shrine were renovated and roofed with copper sheeting. In 1900, Sri Konthi Menon , as a manager fixed the hours of worship and led the drive to keep the temple premises clean. He set up the big bell and reconstructed Pathayapura (granary). In 1928, the Zamorin once again become the administrator of Guruvayur.
In 1931-32 , Late Kelappan (known as "Kerala Gandhi" ) led the Guruvayur Satyagraha to secure the entry of lower castes in temples. The lower castes were allowed to go only up to Thiyyarambalam, more than about half kilometer from the temple. He started a fast unto death in front of the Eastern Gopuram . He broke the fast at the insistence of Mahatma Gandhi. It did not produce any immediate result but led to the entry of Dalits in various Kerala temples .
In 1947, the Guruvayur temple was also opened for the entry of all Hindus. Later, namaskara sadya (feast ),which was only for Brahmins was scrapped and was opened to everyone irrespective of caste
THE FIRE AND RENOVATION
On November30,1970,a massive fire broke out in the temple. It begin from the western chuttambalam and raged all around for five hours, but the Sreekovil , the Vigraha, sub-shrines of Ganapathy , Sastha , Bhagavathy and flag-staff remained unaffected. People from all walks of life, irrespective of age , caste, creed and religion fought the fire to set a glorious example. Later, the temple was once again built to the glory of the Lord.
This shocking incidence of fire took place on 29th November during the season of Ekadasivilakku . On this day Vilakku was celebrated on a grand scale and all the lamps in the Vilakkumatam were lighted. After the Seeveli procession, the function came to an end and the gates of Gopuram were closed. Around 1.00 am, somebody in the immediate neighborhood near the western chuttambalam saw a blaze from within the Temple. Roused by the news, the whole lot of people, irrespective of caste, colour or creed rushed to the Temple and joined in fighting the fire with water and sand. Later, the fire force units of Ponnani,Trichur and FACT arrived and started fighting the fire which seems to have started from the western Vilakkumatam. It was brought under control by 5.30 am.
Seeing the uncontrollable fire , the authorities had already removed the valuables from the Sreekovil. The Ganapathy idol, Sastha idol and the main idol of Lord Guruvayurappan were shifted to the Koothambalam and then to a more safer place, the residence of the Tantri. The fire gutted the whole of chuttambalam, the entire Vilakkumatam on the west, south and north sides. The Chuttambalam was only 3 yards off, but still the fierce fire did not touch even the dry flower garlands, which hung on the corner of the Sreekovil.
Two committees were formed to undertake the renovation work. One committee was headed by the Devaswom Minister, Govt. of Kerala and another technical committee to advice on the renovation work. It had eminent engineers, astrologers and the Tantri as the members. The committee arrived at some general decisions
a) To attract more devotees, all possible alterations to remove inconveniences which are permitted according to tantric principles.
b) To increase the moving space for worshippers by reducing the height of Chuttambalam basement. To provide granite pillars instead of wooden.
c) To put granite wall against the Vilakkumatam.
d) To provide a passage around the Ganapathy shrine to eliminate congestion.
e) To reconstruct the Ganapathy temple in granite.
f) To put a granite engraved "Ananthasayanam" in place of the old "Ananthasayanam" (Mahavishnu lying over serpent) painting which was lost in fire.
g) To widen the gates at the north and east entrances.
h) To reduce the size of the Nivedyathara at the south of the Mandapam.
Eminent astrologers of Kerala were requested to attend the meeting and decide about the Lord's approval for above mentioned changes. Except the widening of two doors everything else were approved. The foundation stone for the renovation was laid by His Holiness Jagatguru Kanchi Kamakoti Matadhipathy Jayendra Saraswathy Swamikal. The ten round pillars in the two Vathilmatam were magnificently carved. The eastern pillar on the southern Vathilmatam, at the foot of which Melpathur meditated and wrote the Narayaneeyam was not removed. After the great fire, the Vilakkumatam, for the first time, was lighted on the Vishu day,14th April, 1973.