The Mughal Empire, which was established following the defeat of Ibrahim Lodi in 1526 at the First Battle of Panipat and consolidated over the time with expansionist policy of its rulers, derived its strength from its nobility which was hypergamous and included the Indian muslims, Turks, Afghans, and even Hindu Rajputs and Khatris.
The Mughal rulers were successful in reigning over a long period of time over the vast area of the subcontinent because of their administrative and religious policy, which provided for the cohesion among various sects and creeds.
Both Babur and Humayun were busy throughout their regnal years in wars and conquest apart from suppression of revolt and couldn't devote enough time for the administration and policies formulation.
It was Akbar (who promoted the syncretic religion called Dīn-i Ilāhī) during whose reign the religious policy of the Mughals were formulated.
The Mughal army while marching towards Mewar destroyed many Hindu temples but Jahangir had warned strictly to prince Khurram to treat Rana Amar Singh I as a friend if he prepares to submit.
Jahangir while his visit to Haridwar founded that Hindus who renounced the worldly life were seeking pleasure on the path of god here and he distributed gifts to them.
The notable Sufi saint, Sheikh Ahmad Sirhindi, once remarked that he once came closed to the god than the Caliphs in his dreams, and was punished by the Emperor, as he strongly refuted his claims.
[9] Yohanan Friedmann has noted that according to many modern historians and thinkers, the puritanical though of Ahmad Sirhindi has inspired the religious orthodoxy of emperor Aurangzeb.
[12] It is noted by historians that this influence has been significantly recorded during the conquest of Kangra under Jahangir, that at the presence of Ahmad Sirhindi who observed the campaign, the Mughal forces had the Idols broken, a cow slaughtered, Khutbah sermon read, and other Islamic rituals performed.
In the sixth regnal year, he announced that the Temples, whose foundation has been laid in the reign of Jahangir, but hadn't been completed yet, should be destroyed or the project to be stopped altogether.
[14] Shah Jahan joined neither of this religious current and while proclaiming the state to be an Islamic one, he never refrained from the liberal policies completely.
Later, on a complaint made by Shantidas and due to a decree of a leading Qazi that banishing someone from his personal possession is against the Islamic jurisprudence, Shah Jahan restored the Temple to him.
[15] As an Emperor, Shah Jahan didn't allow the orthodox elements to dominate and except few incidents of narrow mindedness like in the reign of Jahangir, the Empire as a whole ran with support of heterogeneous nobility in which Hindus were given proper representation.
[16] Shah Jahan is said to have banned mix marriages in Kashmir which implied Muslim girls to took up the custom and religion of their Hindu husbands.
[17] But above all these liberal elements were still active in the empire with Mian Mir and his successor Mullah Shah Badakhshi, who were mentor of Dara Shukoh propagating idea of mutual co-existence.
In the initial years of his reign, Aurangzeb floated the farmans which called for banning of practices like Jharokha Darshan; Tula Dan (weighing the Emperor against the gold and silver) which was started by Akbar.
During his governorship of Gujarat, Aurangzeb publicly desecrated newly built "Chintaman Temple", by killing a cow in its premise and converting it into Mosque.
Other steps like demolition of Kashi Vishwanath Temple and imposing a duty of 5% on Hindu traders as compared to 2.5% on Muslims, were equally controversial.
Aurangzeb's reimposition of Jizya is explained by later historians as the attempt to rally Muslims together, specifically the orthodox ones in a war against Marathas and Rajput kingdoms and also against the Deccani Sultanates which had sided with the heretics.