The Holiest of all Shiva Shrines, the Pashupatinath Temple located in Nepal is the guardian spirit of Lord Shiva on its own. It is one part of among one of Dwadash Jyotirlinga of Kedarnath Jyothirlinga Temple.
One of the most special features of the Shivalinga in Pashupatinath, Nepal is that the Linga has 5 head: The east facing Tatpurusha, the north facing Ardhanarishwara (Vamadeva), the west facing Sadyojata, South facing Aghora and the upward facing Nirakara.
In Chapter 11, titled as “Pashupatinath Linga” of Koti Rudra Samhita in Shiva Purana, Pashupatinath has been described as:
The above translates to:
In Nepal, a Linga by the name of Pashupati has been established and has the power to fulfill all desires. This Linga has the form of the head, and the story of this Linga shall be narrated along with the greatness of Kedareshwara.
The story that is linked to the mentioned “greatness of Kedareshwara” is the Chapter 9 of Koti Rudra Samhita:
The above translates to:
Anyone who had adored and given into Kedara Shiva in the past has never been subject to any kind of suffering or grief. When Pandavas saw him, he took the form of a buffalo using his powers and tried to run away. While he was doing so, Pandavas caught the tail and the transformed buffalo stood there with the head to the ground. The Pandavas prayed to him over and over again. Thus Shiva established himself there. The head portion appeared in Nepal.
What links the two Holy Shrines..
The Pandavas defeated and killed the Kauravas in the epic Kurukshetra war. They wished to atone for the sins of committing fratricide (Gotra hatya) and Brahmana Hatya (killing of Brahmins) during the war. Thus, they handed over the reins of their kingdom to their kin and left in search of the Lord Shiva and to seek his blessings.
First, they went to the holy city of Varanasi (Kashi), believed to Shiva’s favourite city and famous for its Shiva temple. But, Shiva wanted to avoid them as he was deeply incensed by the death and dishonesty at the Kurukshetra war and was insensitive to Pandavas’ prayers. Therefore, he assumed the form of a bull (Nandi) and hid in the Garhwal region.
Not finding Shiva in Varanasi, the Pandavas went to Garhwal Himalayas. Bhima, the second of the 5 Pandava brothers, then standing astride two mountains started to look for Shiva. He saw a bull grazing near Guptakashi (“hidden Kashi”- the name derived from the hiding act of Shiva). Bhima immediately recognized the bull to be Shiva. Bhima caught hold of the bull by its tail and hind legs.
But the bull-formed Shiva disappeared into the ground to later reappear in parts, with the hump raising in Kedarnath, the arms appearing in Tunganath, the nabhi (navel) and stomach surfacing in Madhyamaheshwar, the face showing up at Rudranath and the hair and the head appearing in Kalpeshwar. The Pandavas pleased with this reappearance in five different forms, built temples at the five places for worshipping Shiva. The Pandavas were thus freed from their sins. It is also believed that the fore portions of Shiva appeared at Pashupatinath, Kathmandu.
After building the Panch Kedar temples, the Pandavas mediated at Kedarnath for salvation, performed Yajna and then through the heavenly path called the Mahapanth attained heaven or salvation.