Shivaji died on 3 April 1680, on the eve of Hanuman Jayanti. In a span of 50 years he started from a jagir and ended with a vast empire streching from hilly terrains to southern plain.
After Shivaji's unexpected death in April 1680 his eldest son Sambhaji took power after being challenged by his stepmother Soyarabai. Meanwhile, emperor Aurangzeb's son had a falling out with his father and joined forces with Sambhaji, thereafter Aurangzeb personally lead his vast imperial army to attack and completely destroy the Maratha threat once and for all. He threw the full might of the Mughal empire toward this goal and for a while it seemed that he would achieve his objective.
However, after the capture, torture and the murder of Sambhaji -for his refusal to bow down before Aurangzeb and convert to Islam - turmoil and uncertainty gripped the Marathas who were now on the run and were forced to move their capital from Raigad near Pune to Gingee in the south in current day state of Tamil Nadu.
Thereafter the Maratha forces stabilized and were better organized - began to undertake fast raids on the slow moving Mughal columns. Able generals such asDhanaji Jadhav and Santaji Ghorpade were able to take the initiative and effectively bogged down the powerful but slow moving Mughal army in to a protracted 27 year war. In the last few years of this war both the Maratha generals delivered severe body blows to the Mughals on the shifting battlefields in Maharashtra. In 1697Aurangzeb withdrew from the Deccan for the last time in sickness and thereafter recalled his full army a few years later. After this time the Mughals never again posed a great danger to the Marathas.
And within sixty years of Auragzeb's death the Marathas under the Peshwa's leadership soundly defeated the Mughals and forced them to sign the Ahmediya treaty whereby they relinquished their vast empire in the sub-continent to the Marathas. They were allowed to keep nominal control of Delhi while the Marathas were able to collect taxes from vast swaths of present day India and Pakistan, and down all the way to the Southern tip of the subcontinent.