Shiva appeared as Agnishwara to rescue a young boy. The young boy was an ardent devotee of Shiva but was destined to die at the young age of 12. The story has it that Shiva appeared in the form Agniswara and rescued the boy.
Legend has it that Sage Visvanara and Suchismati who lived in the city of
Dharmapura, on the banks of Narmada, prayed to Lord Shiva for an intelligent child.
Shiva blessed them and a son was born to the couple who was named Grahapati.
When the boy was in his 11th year, Sage Narada informed the sage and his wife that some injury will happen to the boy and it would be in the form of fire.
The parents were worried but the young boy comforted them and told them that he will offer prayers to Shiva who will rescue him from any doom.
The boy then went to Kashi and offered prayers daily after taking bath in the Manikaran Ghat. He worshipped a Shivling on the ghats for a year.
When the time foretold by Sage Narada arrived, Indra appeared before the boy and told him to ask any boon.
The boy straightly refused the boon and told that he would only ask boon from Shiva.
Hearing the words of the boy Indra became angry and decided to punish the boy. He threatened to kill the boy with lightning.
The boy continued with his prayers to Shiva.
Soon Shiva appeared and told the boy that it was he who appeared as Indra to test him. Shiva assured the young boy that not even Yama can harm his devotee.
Shiva gave him the boon that Agni will not touch him.
Shivling that was used by Grihapati to worship Shiva became known as Agnishwara – as it was from this Shivling that Shiva appeared as Agniswara.