The Mughal Empire's province Gujarat (now in India) was managed by the Viceroys appointed by the emperors. On the death of the emperor Jahangir, his son Shah Jahan ascended to the throne in 1627. His Gujarat viceroy Sher Khán Túar worked for relief in 1630–32 famine in the province. Shah Jahan sent his men to expand its territories further south. Between 1632 and 1635, four viceroys were appointed due to their precious gift to the emperor and they could not manage the province well. Kolis of Kankrej in north Gujarat committed excesses and the Jam of Nawanagar did not paid the tribute. Soon Azam Khan was appointed who put the province in order by subduing Kolis in north and Kathis in Kathiawad. He also made the Jam of Nawanagar surrender. The next viceroy Ísa Tarkhán carried out financial reforms. In 1644, the Mughal prince Aurangzeb was appointed as the viceroy who was engaged in religious disputes for destroying a Jain temple in Ahmedabad. Due to his disputes, he was replaced by Sháistah Khán who failed to subdue Kolis. So the prince Murad Bakhsh was appointed as the viceroy in 1654. He restored the disorder soon. In 1657, hearing news of Shah Jahan's severe illness, Murad Bakhsh declared himself the emperor and rebelled with his brother Aurangzeb. They defeated the Jaswant Singh and Kásam Khán, whom Sháh Jahán had appointed viceroys of Málwa and Gujarát respectively in the battle of Dharmatpur. They further went to the capital, Agra but were confronted by Dara Shikoh. They defeated him in the Battle of Samugarh (1658). Soon Aurangzed dumped and imprisoned Murad Bakhsh, confined his father and declared himself the emperor in 1658.

Viceroys under Shah Jahan (1627–1658)

Sher Khán Túar, Eighteenth Viceroy, 1627–1632 On the death of the emperor Jehangir, his son Shah Jahan ascended to the throne in 1627. Remembering the incumbent viceroy Saif Khán's hostility to him during his rebellion against his father, he imprisoned him and appointed Sher Khán Túar eighteenth viceroy with Khwájah Hayát as his minister. When Shah Jahan was near Surat, he appointed Mír Shams-ud-dín to be governor of Surat Castle. In 1627, Sháh Jahán on his way to Delji visited Ahmedabad and encamped outside of the city near the Kankaria Lake. Sher Khán was advanced to the command of 5000 men, and received an increase of salary and other gifts. At the same time Khán Jehán was appointed his minister, and Mîrza Ísa Tarkhán was made viceroy of Thatta in Sindh. In 1628, Khwájah Abúl Hasan was sent to conquer the country of Nashik and Sangamner which he ravaged, and returned after taking the fort of Chandod and levying tribute from the chief of Baglan. In 1630, Jamál Khán Karáwal came to the Gujarát-Khándesh frontier and captured 130 elephants in the Sultánpur forests, seventy of which valued at a lákh of rupees were sent to Delhi.

Famine, 1631–32 In 1631–32 Gujarát was wasted by the famine known as the Satiásio Kál or ’87 famine. So severe was the scarcity that according to the Bádsháh Náma, rank sold for a cake, life was offered for a loaf, the flesh of a son was preferred to his love. The emperor opened soup kitchens and alms-houses at Surat and Áhmedábád and ordered Rupees 5000 to be distributed.

Islám Khán, Nineteenth Viceroy, 1632 Sher Khán was recalled in 1632, but died before he could be relieved by Islám Khán, the nineteenth viceroy of Gujarát, along with whom Khwájah Jehán was chosen minister. Islám Khán's monthly salary was Rupees 4000, and his command was raised from 5000 to 6000. In 1632, Khwájah Jehán went on pilgrimage to Mecca, and was succeeded as minister by Ágha Afzal with the title of Afzal Khán. Afzal Khán was soon appointed commander of Baroda, and Riáyat Khán succeeded him as minister. The post of viceroy of Gujarát appears to have been granted to whichever of the nobles of the court was in a position to make the most valuable presents to the emperor.

Disorder, 1632. Government became lax, the Kolis of the Kánkrej committed excesses, and the Jám of Nawanagar withheld his tribute.

Bákar Khán, Twentieth Viceroy, 1632 At this time of disorder, Bákar Khán presented the emperor with golden and jewelled ornaments to the value of Rupees 2,00,000 and was appointed viceroy, Riáyat Khán being continued as minister.

Sipáhdár Khán Twenty-first Viceroy, 1633 In 1633 Sipáhdár Khán was appointed viceroy, and presented the emperor with costly embroidered velvet tents with golden posts worthy to hold the famous Takhti-Táús or Peacock Throne which was just completed at a cost of one crore of rupees. Riáyat Khán was continued as minister.

Saif Khán, Twenty-second Viceroy, 1633–1635 In 1635, Saif Khán was appointed twenty-second viceroy, with Riáyat Khán as minister. During Saif Khán's tenure of power Mírza Ísa Tarkhán received a grant of the province of Sorath, which had fallen waste through the laxity of its governors. Before he had been in power for more than a year Saif Khán was recalled. As he was preparing to start, he died at Ahmedabad and was buried in Sháh-i-Álam's shrine to which he had added the dome over the tomb and the mosque to the north of the enclosure.

Ázam Khán, Twenty-third Viceroy, 1635–1642

At the end of 1635, Ázam Khán was appointed twenty-third viceroy, with Riáyat Khán in the first instance, and afterwards with Mír Muhammad Sábir, as minister. The men who had recently been allowed to act as viceroys had shown themselves unfit to keep in order the rebellious chiefs and tribes of Gujarát. For this reason the emperor's choice fell upon Ázam Khán, a man of ability, who perceived the danger of the existing state of affairs, and saw that to restore the province to order, firm, even severe, measures were required.

Engaged with the Kolis and Kathis When Ázam Khán reached Sidhpur, the merchants complained bitterly of the outrages of one Kánji, a Chunvalia Koli, who had been especially daring in plundering merchandise and committing highway robberies. Ázam Khán, anxious to start with a show of vigour, before proceeding to Áhmedábád, marched against Kánji, who fled to the village of Bhádar near Kheralu, sixty miles north-east of Áhmedábád. Ázam Khán pursued him so hotly that Kánji surrendered, handed over his plunder, and gave security not only that he would not again commit robberies, but that he would pay an annual tribute of Rupees 10,000. Ázam Khán then built two fortified posts in the Koli country, naming one Ázamábád after himself, and the other Khalílábád after his son. He next marched to Kathiawad and subdued the Kathis, who were continually ravaging the country near Dhandhuka, and to check them erected a fortified post called Sháhpúr, on the opposite side of the river to Chuda-Ránpur. Ágha Fázil known as Fázil Khán, who had at one time held the post of minister, and had, in 1636, been appointed governor of Baroda, was now selected to command the special cavalry composing the bodyguard of prince Muhammad Aurangzeb. At the same time, Sayad Ilahdád was appointed governor of Surat fort, Ísa Tarkhán remaining at Junagadh. In 1637, Mír Muhammad Sábir was chosen minister in place of Riáyat Khán, and in 1638 Muîz-zul-Mulk was re-appointed to the command of Surat fort. Shortly after Ázam Khán's daughter was sent to Delhi, and espoused to the emperor's son Muhammad Shujá Bahádur. In 1639, Ázam Khán, who for his love of building was known as Udhai or the White Ant, devoted his attention to establishing fortified posts to check rebellion and robbery in the country of the Kolis and the Káthis. So complete were his arrangements that people could travel safely all over Jhalawad, Kathiawad, Nawanagar, and Kutch.

Revolt of the Jám of Nawanagar, 1640. In 1640, The Jám of Nawanagar withheld his tribute, and set up a mint to coin koris. When Ázam Khán heard of this, he marched with an army against Nawánagar, and, on arriving about three miles from the city, he sent the Jám a peremptory order to pay the arrears of tribute and to close his mint, ordering him, if any disturbance occurred in that part of the country, at once to send his son to the viceroy to learn his will. He further ordered the Jám to dismiss to their own countries all refugees from other parts of Gujarát. The Jám being unable to cope with Ázam Khán, acceded to these terms; and Ázam Khán, receiving the arrears of tribute, returned to Áhmedábád. As Ázam Khán's stern and somewhat rough rule made him unpopular, Sayad Jálál Bukhári whose estates were being deserted from fear of him brought the matter to the emperor's notice.

Ísa Tarkhán, Twenty-fourth Viceroy, 1642–1644 In consequence, in 1642, the emperor Shah Jahan recalled Ázam Khán and appointed in his place Mírza Ísa Tarkhán, then governor of Sorath, twenty-fourth viceroy of Gujarát. And as it was feared that in anger at being re-called, Ázam Khán might oppress some of those who had complained against him, this order was written by the emperor with his own hand. Thanks to Ázam Khán's firm rule, the new viceroy found the province in good order, and was able to devote his attention to financial reforms, among them the introduction of the share, bhágvatái, system of levying land revenue in kind. When Mírza Ísa Tarkhán was raised to be viceroy of Gujarát, he appointed his son Ináyatulláh to be governor of Junagadh, and Muiz-zul-Mulk to fill the post of minister. During the viceroyalty of Mírza Ísa, Sayad Jalál Bukhári a descendant of Saint Sháh-i-Álam was appointed to the high post of Sadr-us-Sudúr or chief law officer for the whole of India. This was a time of prosperity especially in Surat, whose port dues which were settled on the Pádsháh Begam had risen from two and a half to five lákhs. Mírza Ísa Tarkhán's term of power was brief.

Prince Muhammad Aurangzeb, Twenty-fifth Viceroy, 1644–1646 In 1644, the emperor appointed prince Muhammad Aurangzeb to the charge of Gujarát, Muiz-zul-Mulk being ordered by the emperor to continue to act as his minister. In 1645, seventy-three elephants were captured in the forests of Dahod and Champaner.

Prince Aurangzeb's rule in Gujarát was marked by religious disputes. In 1645, the Mughal prince Aurangzeb desecrated the Chintamani Parshvanath temple constructed (1638) by the influential Jain merchant Shantidas Jhaveri near Saraspur, a suburb of Áhmedábád, above a mile and a half east of the city. According to the French traveller Jean de Thévenot (1666), Aurangzeb caused a cow to be killed in the temple premises, destroyed the noses of all idols in the temple, and then converted the place into a mosque called Quvval-ul-Islam ("the Might of Islam"). Shantidas complained to Aurangzeb's father Emperor Shah Jahan. In 1648, the Emperor issued a firman (order) declaring that the building should be handed over to Shantidas, and a wall should be raised between the mihrabs (niches in the mosque walls) and the rest of the original temple building. It also declared that the Muslim fakirs housed in the mosque premises should be removed, and the materials carried away from the temple should be restored.

In another case, both of the contending parties were Muslims, the orthodox believers, aided by the military under the prince's orders, who was enraged at Sayad Ráju one of his followers joining the heretics, attacking and slaughtering the representatives of the Mahdavia sect in Áhmedábád. Sayad Ráju's spirit, under the name of Rájú Shahíd or Rájú the martyr, is still worshipped as a disease-scaring guardian by the Pinjaras and Mansuris and Dúdhwálas of Áhmedábád.

Sháistah Khán, Twenty-sixth Viceroy, 1646–1648