Ernakulathappan Temple is situated in the heart of Ernakulam City with lord Shiva as deity. This is one of the rarest Shiva temples where deity is facing sea towards west.The pooja methods were regularised as directed by the famous Villawamangalathu Swamiyar. Devotees who dedicate themselves to the lord with utmost devotion are said to be relieved of their sufferings leading to ultimate Moksha.
The story dates back to the times of Arjuna (Pandava Prince). Arjuna performs a severe penance to please the lord. Pleased with Arjuna's devotion Shiva accompanied with his consort Sri Parvathi set out from their abode at Kailash to meet Arjuna. Shiva intends to impress Parvathi with the devotion Arjuna has towards him. Shiva disguises himself as ' Kiratha' a notorious demon before appearing before Arjuna. Just as Shiva appears before Arjuna he sees a wild boar charging towards Arjuna and shoots an arrow at the boar. Arjuna, who is an accomplished archer, also shoots an arrow at the boar. The boar who was in fact a demon named Mookasura in disguise is killed and its original form is revealed. However, dispute arises between Arjuna and Kiratha as to who is the real killer of the animal. A battle ensues between the two, lasting a long time, ultimately resulting in Kiratha's victory over Arjuna.The vanquished Arjuna, unable to even stand up makes a Shiva Linga out the earth and performs a pooja offering flowers. To his surprise, he sees that the flower he offers over the Shiva Linga is falling over the head of Kiratha. Arjuna then realises that Kiratha is non other than his Lord Shiva. Shiva, in his true form, along with goddess Parvathy appears before Arjuna and blesses him. He also gifts him the divine arrow, the ' Pasupathastram.'
Ages pass by. A boy named Devalan, victim of a curse and now a Nagarshi wanders about seeking a means to redeem himself from the curse. He comes across the Siva Linga made by Arjuna and takes it with him. After taking holy dips in the sacred rivers and praying at temples he arrives at 'Rishinakulam' - the ancient name of present Ernakulam. Finding that the place is suitable for Shiva Prasada, the Nagarshi places the Shiva Lingam on the ground and offers poojas. However, the locals harass him and he decides to leave with the Shiva Linga. On attempting to lift the Shiva Linga he finds that it has become fixed to the ground and cannot be moved. It is this Shiva Linga we see as Kirathamoorthy on the northern side of the temple. Devalan peforms his rites here and is redeemed from the curse. At his request the Shiva and Parvathy appear here and exist in the form of Linga. It is this 'Gourisankara roopam' that is seen as 'Swauambhoolingam' in the Sanctum Sanctorium. Later the temple was built and the diety installed.