Jaagnath Mahadev is linked with Trishanku, the son of Raja Nibandhan of Ayodhya. According to Vishwamitra Mahatmya, this temple was known as Yaagnath Mahadev. The word "Yaag" symbolises "Yagn" (Ritual Ceremony) and with time, it became to be known as Jaagnath Mahadev. Jaagnath means the state of awakening.

After acquiring the blessings of Rishi Vishwamitra, Raja Trishanku performed the 1000 Kundi Yagna ceremony here for 1000 days. Raja Trishanku then went to heaven due to the auspicious effects of the yagna.