According to the legend, Dashanan was doing penance on the Himalayas to please Ravana Lord Shankar, cutting his head one by one and offering it to Shivalinga. After offering 9 heads, when Ravana was about to be beheaded 10th, Bholenath appeared pleased and appeared to him and asked him to ask for a bride.Then Ravana asked for a boon to take ‘Kamna Linga’ to Lanka. Ravana not only had the power to rule the three worlds besides gold Lanka, as well as imprisoned many gods, Yakshas and Gandharvas and kept them in Lanka. For this reason, Ravana expressed his wish that Lord Shiva should leave Kailash and stay in Lanka, Mahadev fulfilled his wish, but also kept a condition. He said that if you kept Shivalinga on the way, then I will stay there again and will not wake up, Ravana accepted the condition, here all the gods got worried as soon as they heard of Lord Shiva leaving Kailash, to solve this problem. All went to Lord Vishnu. Then Mr. Hari created Leela. Lord Vishnu asked Varun Dev to enter Ravana’s stomach through Achman. Therefore, when Ravana came to Sri Lanka with a shivling after Achman, he got a small glimpse near Devghar, in such a situation, Ravana went to take a Shivalinga to a Baiju named Ahir. It is said that there was Lord Vishnu in the form of Baiju Gwale (Ahir). Due to this also, this place of pilgrimage is famous with Baijnath Dham. According to mythological texts, Ravana kept on miniature for many hours, which is still in Devghar as a pond. As Ravana was delaying, in the same way, the weight of Shivalinga was increasing and being fed here, Baiju Ahir installed Shivlinga on the earth. When Ravana returned, he could not lift the Shivling even after a million attempts. Then he too understood this leela of God and he became angry and went after kicking four on the Shivling and coined his thumb.Baiju was watching all this, he felt that this is the way to do devotion to Baba ji, since then Baiju’s routine became routine, he used to hit four sticks on the Shivling daily and then he would get absorbed in the devotion of Mahadev by pressing the Shivling with the thumb. One day Baiju was very hungry, when he went home and as soon as the food was in his mouth, Baiju remembered that today, he did not have devotion to Bhole Baba; Mahadev would have appeared while attacking Shivling, Mahadev speaking Baiju I have been very happy with your devotion. On seeing Baiju Mahadev, he falls at his feet and says Mahadev I had seen Ravana, I would have done such devotion to you. Hugging Mahadev Baiju and saying Baiju you have done my devotion with heart, from today the world will know you as my greatest devotee, your name will be taken before me and this place will be famous as Baba Baijnath Dham. Every wish that a devotee will come here with true heart and worship will be fulfilled.After that Brahma, Vishnu and other gods came and worshiped that Shivling. As soon as Shiva appeared, all the Gods and Goddesses established the Shivling at the same place and praised Shiva and went back to heaven. Since then Mahadev sits in Deoghar as ‘Kamana Linga’.