Emperor Akbar ruled the Mughal Empire from 1556 to 1605. When he came to the throne, he confronted a problem that had plagued his predecessors: how to be a Muslim ruler over a majority-Hindu nation, that also had substantial numbers of various other religions including Buddhism and Jainism. He eventually came to believe that no religion could have pre-eminence. In fact, he was not even sure that any religion was “the truth” but were all humanity’s imperfect interpretations. The logical conclusion is that all subjects of his empire should be free to practice whatever religion they wished.
Akbar began to hold conferences weekly, with wise men from all faiths (no known women, though). He would apply their wisdom to questions of state. He slowly took over spiritual leadership, even getting the Muslim clergy to pronounce a fatwa (judgement) that as emperor, Akbar could adjudicate any dispute between religious authorities – even overruling the Qur'an if necessary for the public interest.
Legally, Akbar made two big changes. He abolished the hated tax levied on the Hindu majority, the jizya, the “contribution for not being put to death”. He also created a private faith for the elite. It was not a new religion, per se. It was a kind of Sufi system for the rulers, with 10 cardinal virtues, the essence of which was promoting tolerance. Akbar combined aspects of different faiths, borrowing from all the religions of his empire, to create an ethical code that he wished his inner circle to follow. He called this the Din i-Ilahi, or “Worship of God.” While it has been accused of being a pick-and-mix religion, Akbar did not proclaim it a religion, and he remained a Muslim all his life.
The Din i-Ilahi died with Akbar in 1605, and the jizya was reintroduced by Akbar’s great-grandson Aurangzeb in 1679.