Muhammad Zaman Mirza was a Timurid descendant and General of Mughal Emperors Babur and Humayun. He claimed himself as the ruler of Gujarat in 1537 but did not gained actual control.
He tried to exert his independence early on but was imprisoned at Bayana by order of Emperor Humayun, but he managed to escape and took refuge in Gujarat Sultanate where Sultan Qutb-ud-Din Bahadur Shah welcomed him.
On December 23, 1534 while on board the galleon St. Mattheus, Sultan Qutb-ud-Din Bahadur Shah signed the Treaty of Bassein. Based on the terms of the agreement, the Portuguese Empire gained control of the city of Bassein, as well as its territories, islands, and seas. In 1535, Gujarat was occupied by the Mughals, and Bahadur Shah was forced to conclude an alliance with the Portuguese to regain the country, conceding Daman and Diu, Mumbai, and Vasai to the Portuguese. In February 1537, he was killed by the Portuguese while visiting them on a Portuguese ship anchored off the coast of Gujarat, and his body was dumped into the Arabian Sea.
Sultan Qutb-ud-Din Bahadur Shah had no legitimate son, hence there was some uncertainty regarding succession after his death. Muhammad Zaman Mirza, the fugitive Mughal general made his claim on the ground that Bahadur's mother adopted him as her son. Seeing the danger in this declaration, The Gujarati nobles selected Sultan Qutb-ud-Din Bahadur Shah's nephew Miran Muhammad Shah I of Khandesh as his successor, but he died on his way to Gujarat. Finally, the nobles selected Mahmud Khan, son of Bahadur's brother Latif Khan as his successor and he ascended to the throne as Mahmud Shah III on May 10, 1538.