Madmaheshwar Temple, one of the panchakedar shrines, is located at the foothills of Chaukhamba, in Rudraprayag District
. Dedicated to Lord Shiva
, the temple is perched on a ridge, at an altitude of 3,289 meters above the sea level, 25 km north-east of Guptakashi.
According to a popular legend, the Pandavas sought the blessings of Lord Shiva to atone their sins after the battle of Kurukshetra. Lord Shiva eluded them repeatedly and hid himself at Guptakashi. When Pandavas spotted him at there, Shiva tried fleeing and took the form of a bull at Kedarnath. On being followed by the Pandava brothers, he dived into the ground and disappeared; only his hump could be seen. Bhim, the second Pandava brother, jumped on this hump and tried to catch hold of the bull by his hump. It is believed that just as bull's hump appeared in Kedarnath, his belly appeared in Madmaheshwar Temple, his limbs at Tungnath Temple, his head and hair at Kalpeshwar Temple and his face at Rudranath Temple. All these five temples are together known as Panchakedar and a pilgrimage of all these five shrines is considered holy by the Hindus.
To reach Madmaheshwar Temple, one has to trek from Kalimath. The temple remains closed during winter. At the onset of winter, a representative idol of the main deity is taken to Uttarkashi for worship.