The temple was built by King Jagat Jaya Malla of the Mala Dynasty. Originally there was a Narayan statue in the temple. In 1766, the statue was stolen. Two years later, Pritvi Narayan. Shah captured the Kathmandu Valley and replaced the Narayan statue with the Bagwarti.