The puranas tell us that in the battle of Mahabharat, the Pandavas had won the war over Kauravas. Aftermath the massacre of Kauravas in the battle of Mahabharat in Kurukshetra, the Pandavas decided to take the journey to Kashi in order to take the blessings of Lord Shiva to get absolved from the sin of killing their own kinsmen – the Kauravas. Lord Shiva was not willing to forgive them for their wrongdoings and fled to Himalayas from Kashi in order to avoid giving them his darshan. Initially, the Lord Shiva hid in Guptkashi and the name implies the same –the Kashi in hiding.
The Lord Shiva was hiding in Guptkashi but was soon identified by Pandavas and He had to leave Guptakashi for Kedaranth. The Pandavas with stern willpower chased Him and reached Kedarnath. At Kedarnath, the Lord faked Him in the form of a bull amongst other cattle. The Pandavas had guessed the Lord Shiva’s ploy and waited until dusk when all the cattle started going back to home. Bhim planned to detect the Lord by planning to testify the cattle going underneath him, he stretched his legs across mountains and let the cattle go underneath him. All the cattle went under his legs, except Shiva in the form of the bull. At the end, Shiva dived into the earth in order to escape but His back (hump) portion came in the hand of Bhim. Finally, Lord Shiva was pleased with the determination of the Pandavas and exonerated them from their sin. He also bestowed them the opportunity to worship him in the form of the hump. Since then, the hump in the form of conical stone in the temple of Kedarnath is worshipped.
Legend has also it that after the disappearance of Lord Shiva into the earth, the front portion appeared at Pashupatinath, Nepal. The other four portions which appeared at different places are as follows:
Tungnath – Arms, Rudranath – Face, Madmaheshwar – Navel, Kalpeshwar – Hair coils.The above four along with Kedarnath are called Panch Kedars.