The followers of the Nath sect are known for their devotion to Lord Shiva. They have built deras, or habitats, and temples wherever they have settled. One such temple was built in the 13th century at a place which is now known as Hisar Gate in Sirsa.
The temple was constructed by Sarsai Nath, a leading sage or a guru of the Nath sect who along with other followers prayed, performed rituals and meditated at this place.
According to an inscription in Bhoja found in Sirsa, Nilkantha, a saint of Pashupati Sect, also built a temple dedicated to Yogisvara or Lord Shiva in Sirsa by using baked bricks and thick stone slabs sometimes in the 8th or the 9th centuries. The temple was topped with a golden Shikhara or a spiral. Since there were no remains of the temple, Baba Sarsai Nath built it again.
It is believed that Mughal Emperor Shah Jahan paid a visit to Dera Baba Sarsai Nath to seek blessings for the recovery of his ailing son. He also donated land to the temple and constructed a dome over it. The dera management possesses a document written in Arabic that verifies the visit of the emperor. The dera also houses a temple of Mataa Durga besides the one dedicated to Lord Shiva.