According to the legend, it is believed that during the Treta Yug, Ravana in order to have invincible powers worshiped Lord Shiva in the Kailash. In the same process, to please the almighty he offered his ten heads in the havan kund. Influenced by this extra ordinary deed of the Ravana, the Lord Shiva not only restored his heads but also bestowed him with powers of invincibility and immortality.
On attaining this incomparable boon, Ravana also requested the Lord Shiva to accompany him to Lanka. Shiva consented to the request of Ravana and converted himself into ling. The Lord Shiva asked him to carry the ling and told him that he should not place the ling down on the ground on his way. Ravana stared moving in south direction and reached Baijnath where he felt the need to answer the nature’s call. On seeing a shepherd, Ravana handed over the ling to him and went away to get himself relieved. On finding the ling very heavy, shepherd kept the ling on the ground and the ling got established there and the same is in the form of ardhnarishwar.
In the town of Baijnath, Dussehra festival in which traditionally the effigy of the Ravana is consigned to flames is not celebrated as a mark of respect to the devotion of Ravana towards Lord Shiva. Another interesting thing about the town of Baijnath is that there is no shop of goldsmiths.