Legend has it that the people in the vicinity of Nageshvar Temple were terrorized by demoness Daruka. People were attacked and killed by Daruka. Merchants could no longer do their business as all their goods were looted by her.
People then prayed to Shiva and who appeared along with his Nagas or serpents and chased Demoness Daruka away.
Demoness Daruka was an ardent devotee of Goddess Shakti. She prayed to her for help. Goddess Shakti then asked demoness Daruka to make her home in a dense forest nearby and not to harm other living beings.
Shiva decided to stay there as Nageshvar and Goddess Parvati appeared as Nageshvari. Both keep a close watch on the forest that demoness Daruka resides.