Nageshvara Jyotirlinga is one of the 12 Jyotirlinga shrines mentioned in the Shiva Purana. Nageshvara is believed to be the first such shrine.
The Shiva Purana says Nageshvara Jyotirlinga is in 'the Darukavana', which is an ancient name of a forest in India. 'Darukavana' finds mention in Indian epics, such as Kamyakavana, Dvaitavana, Dandakavana.
A narrative in the Shiva Purana about the Nageshvara Jyotirlinga tells of a demon named Daaruka, who attacked a Shiva devotee named Supriya and imprisoned him along with many others in his city of Darukavana, a city under the sea inhabited by seasnakes and demons. At the urgent exhortations of Supriya, the prisoners started to chant the holy mantra of Shiva and immediately thereafter the Lord Shiva appeared and the demon was vanquished, later residing there in the form of a Jyotirlinga.
The demon had a wife, a demoness named Daaruki who worshipped Mata Parvati. As a result of her penance and devotion, Mata Parvati enabled her to master the forest where she performed her devotions, and renamed the forest 'Darukavana' in her honour. Wherever Daaruki went the forest followed her. In order to save the demons of Darukavana from the punishment of the gods, Daaruka summoned up the power Parvati had given her. She then moved the entire forest into the sea where they continued their campaign against the hermits, kidnapping people and keeping them confined in their new lair under the sea, which was how that great Shiva devotee, Supriya, had wound up there.
The arrival of Supriya caused a revolution. He set up a lingam and made the prisoners recite the mantra Om Namaha Shivay in honour of Shiva while he prayed to the lingam. The demons' response to the chanting was to attempt to kill Supriya, though they were thwarted when Shiva appeared and handed him a divine weapon that saved his life. Daaruki and the demons were defeated and Parvati saved the remaining demons. The lingam that Supriya had set up was called Nagesha; it is the tenth lingam. Shiva once again assumed the form of a Jyotirlinga with the name Nageshwar, while the Goddess Parvati was known as Nageshwari. The Lord Shiva then announced that he would show the correct path to those who would worship him.