His father gave him the government of Hisar and Termez in 1459 (according to Babur ), but lost them to Sultan Husayn Mirza Bayqara, who, according Babur, defeated him in two major battles: at Astarabad in 1459, and at Chikman (Sarai) near Andikhud around 1465, after which Mahmud Mirza retreated to Herat.
Sultan Mahmud then marched on Herat with the support of Qambar Ali Beg, Governor of Hisar, who had accompanied Abu Sa'id to Iraq and had returned.
Then Amir Khusraw and Qambar Ali Shah, with the consent of Sultan Ahmed Mirza, took Mahmud to Hisar to rule there and after 1497, he dominated the territories south of Quhqa (Quhlugha) from the Kohtin Mountains to the Hindu Kush mountain range, including Termez, Chaghaniyan, Hisan, Khuttalan, Kunduz and Badakhshan.
In 1479 his brother Mirza Abu Bakr died, and he took control of Badakhshan, Kunduz, Khuttalan and Caghaniyan.
According to Babur, he had led two holy wars against Kafiristan, south of Badakhshan, and for this was called Sultan Mahmud Ghazi.