Yes they were muslims but that doesn't make them sin free.
Their ruling practices and personal beliefs were influenced heavily by their timurid origins, mongol practices, persia and of course exposure to hindusim.
The great was perhaps the most conservative but he was also quite brutal. I sometimes wonder what the fate of the subcontinent would have been if Dara Shikoh had defeated Aurungzeb. Perhaps the whole of India would have became a blend of hindu influenced sufi mystics.
There is a wonderful book by Shahab Ahmed -
What is Islam? The Importance of Being Islamic
Ahmed’s book is not focused on the Mughal empire specifically but more broadly on what he calls the Balkans-to-Bengal complex, roughly in the years 1350 to 1850.
In the book Ahmed challenges the privileging of a normative text-based core as the supposed orthodoxy. The tendency towards elevating a “legal-supremacist” understanding reduces Islam to a set of prescriptions and proscriptions and underplays the exploratory dimension that has animated the works and thoughts of many Muslims historically. This tendency is partly to do with the “modern historical movement.” As he writes:
“Law is a
leitmotif of the modern human condition in a manner and degree unprecedented in any prior period of history. Not only is the fundamental organizational unit of modern human society to which all human subjects
belong—that is, the nation state—
constituted as a
legally-determined entity (as distinct from a divinely- or patrimonially-determined entity)—one might even say that the nation-state is a legal fiction: it is, literally,
made up by law—but the modern human condition is more thoroughly pervaded by the technology and force of the structures of law than has been any other human condition.”
The tendency to view Islam through the modern legalist prism relegates expressions of poetry, philosophy, visual arts etc. to mere aspects of ‘culture’ or something belonging to a supposed ‘secular’ sphere, even if they were “Islamically meaningful,” or that they in some way conveyed and embodied Islam to Muslims of the time.
Ahmed made his case brilliantly. It is sad that he died shortly before the book was published in 2015.