This temple is dedicated to Lord Shiva and was built in Chola period. The temple links with the pre-historic Markanda purana.
Markandeya is an ancient sage born in the clan of Bhrigu rishi. Mrikandu rishi and his wife Marudmati did not have any child for a long time. They worshipped Lord Shiva and sought from him the boon of begetting a son. Shiva was pleased with their penance and gave them the choice of either an exemplary gifted child who lives only for 16 years or a child of low intelligence who would live for 100 years. Marikandu rishi chose the former, and was blessed with Markandeya, an exemplary son, destined to die at the age of 16.
Markandeya spent his childhood in the town of Shahabad Markanda on the banks of river Markanda in the Haryana state. He grew up to be a great devotee of Shiva and had mastered the Mahamrityunjaya mantra by the age of 12. When he reached the age of 16, he started praying to Shiva to get rid from the clutches of Yama, as he was not ready to leave Shiva. On the day of his destined death, he continued his worship of Shiva in his aniconic form of Shivalinga. The place where he prayed and the further happenings took place at this hill named Markandeya Betta, 2 km from Vakkaleri village and 18 km from Bangarpet in Kolar district of Karnataka state.
When Yama (Lord of Death) arrived, Markandeya was praying to a Shiva Linga. When he saw Yama, out of fear, Markandeya grabbed a hold of the Shiva Linga and asked Lord Shiva to protect him. When Yama forced him, he grabbed the Shiva Linga tightly. Yama threw his pashana (whip) and sprung his noose around the young sage's neck. By accident or fate, the noose mistakenly landed around the Shivalinga. Suddenly the Linga burst open with a thundering sound and Shiva emerged in all his fury attacking Yama for his act of aggression. He threw his Trishula (trident) on Yama, defeating Yama in battle to the point of death. Shiva then revived him Yama under the condition that the devout youth would live forever. For this act, Shiva was thereafter known also as Kalantaka ("ender of death"). This was said to have happened in Thirukkadavoor in Tamilnadu. Shiva was very pleased with Markandeya and gifted him the boon of being Chiranjeevi (who has no death).
Thus, Maha Mrityunjaya Stotra is also attributed to Markandeya, and this legend of Shiva conquering death is inscribed in metal and worshipped at Thirukkadavoor in Tamilnadu.
This temple situated on the Markandeya Betta (hill) displays ample proof of these incidents. There is a well that has a black striped mark inside, which is said to be a mark of Yama’s whip that is extended till the Shiva linga inside the Garbhagriha. There is also a three-finger mark on the Linga. The temple has intricate carvings on all the pillars explaining its history. Earlier (until recent renovation with stones paved), the footsteps of the bull on which Yama had come, Yama’s body prints on fainting and the marks of whip which Yama threw till the Linga were visible too. These are now buried under the stones.