In October 1995, when Lt Gen Ali Kuli Khan was appointed Rawalpindi Corps Commander by then army chief Gen. Abdul Waheed Kakar, Mahmud Ahmed took over from him as DGMI. Brig. Mahmud was promoted to Lt Gen in June 1998, and posted by Gen. Jehangir Karamat, then COAS, as Commandant, National Defense College. On taking over as the COAS in October, 1998, Gen. Musharraf brought him as Commander X Corps replacing Lt Gen Salim Haider who proceeded as Corps Commander Mangla. Mahmud was posted, after the coup, as DG, ISI, in place of Lt .Gen. Ziauddin Butt. He himself was replaced by Lieutenant General Jamshed Gulzar Kayani as the Rawalpindi Corps commander.
Lt General Mahmud Ahmed was later nominated for the ceremonial post of Colonel Commandant of the Corps of Artillery at the Artillery Regimental Center on 17 March 2001.
General Mahmud Ahmed opposed the US invasion of Afghanistan. He was retired from his role in the ISI on 8 October 2001, just prior to the US invasion of Afghanistan.
He is now a active member of Tablighi Jamaat and preaching the teaching of Islam.