Bhima – the demon, was the son of Karkati and the brother of Ravana – Kumbhakarna (Burmese: Kumbikhanna. Indonesian: Kumbhakarno. Malay: Kumbakarna. Sanskrit: कुम्भकर्ण Kumbhakarṇna. Tamil: கும்பகருணன் Kumbakarunan. Telugu: కుంభకర్ణ/కుంభకర్ణుడు Kumbhakarna/kumbhakarnudu. Thai: Kumphakan).
One day Bhima asked his mother Karkati about details of why they lived alone in the forest in Dakini, and who was his father. Karkati told him that she was married to Viradha who was killed by Sri Ram. Later, she married Kumbhakarna who had promised to take her to Lanka. But Kumbhakarna was also killed by Sri Ram.
Bhima decided to avenge his fathers death. He decided to take revenge. He did tremendous penance and prayed to Lord Brahma. The Rakshasa Bhima asked for a boon that he may be the strongest, which was granted by Lord Brahma. The super strong rakshasa attacked the heavens and drove out all the Gods. Bhima also attacked and imprisoned the pious King Kamarupa and his wife.
While in prison, King Kamarupa used to pray to Lord Shiva and chant Om Namah Shivay. His wife worshipped a Parthiva Linga (A Shivling made out of mud or clay). All the Gods who had been driven out of Heavens went to the banks of the river Mahakeshi and also worshipped a Parthiva Linga of Lord Shiva.
Someone told Bhima that King Kamarupa was praying to Lord Shiva to get Bhima killed. Enraged, Bhima stormed into the prison to destroy the Shivling and kill the King. The King was praying before the Shiva Linga. The demon Bhima asked the King if God would protect him from the raksasa Bheema, and insisted that the King pray to Bhima instead, as Bhima was the person who controlled the Kings destiny and life. The King refused to pray to the wicked Bhima. Bhima made fun of the Shiva Linga, and disrespectfully struck it with his sword. He then raised the sword to destroy the Shiva Linga and kill King Kamarupa. Suddenly, Lord Shiva appeared and threw off Bhima’s sword. Bhima attacked Lord Shiva with different weapons. Lord Shiva kept deflecting all the attacks.
Finally, at the request of Narada , Lord Shiva produced a fire that engulfed the area and killed the demon Bhima, burning him to ashes. The Gods requested Lord Shiva to remain there. Lord Shiva accepted their request, and established himself in the form of BhimaShankar Jyotirlinga.