In the early 18th century, a Mughal emperor was on a spree of destroying Hindu temples. But when he reached the Nageshwar temple, it seems a swarm of bees attacked him and his troops which led to their retreat and thus the temple was saved from destruction. Later the temple was rebuilt by the devotees.