<P> Kalidasa (c. 4th--5th century CE), the great Sanskrit poet of the times during the regime of king Vikramāditya belonging to the Gupta period, has mentioned about the rituals of the temple in his works in Meghadūta . He mentions about the nada - aradhana, the performance of art and dance during the evening rituals . </P> <P> The temple complex was destroyed by Sultan Shams - ud - din Iltutmish during his raid of Ujjain in 1234 - 5 . </P> <P> The present structure was built by the Maratha general Ranoji Scindia in 1734 CE . Further developments and management was done by other members of his dynasty, including Mahadji Scindia (1730--12 February 1794) and Daulat Rao Scindia's wife Baiza Bai. (1827--1863). During the reign of Jayajirao Scindia (until 1886), major programs of the then Gwalior State used to be held at this temple . </P> <P> Maratha regime was established in Ujjain in the fourth decade of Eighteenth c . The administration of Ujjain was assigned by Peshwa Bajirao - I to his faithful commander Ranoji Shinde, The diwan of Ranoji was Sukhatanakar Ramchandra Baba Shenavi who was very wealthy he decided to invest his wealth for religious purposes . In this connection, he re-built the famous Mahakala temple in Ujjain during the 4th - 5th decades of Eighteenth c . AD . </P>

Mahakal temple was located in the kingdom of which dynasty