He started his career by joining the Pakistan Administrative Service cadre of the civil bureaucracy in 1973. He served as Assistant Commissioner of Murree and Pakpatan from 1975 to 1978. He was then made Deputy Secretary to the Government of the Punjab where he served till 1980. He served as Deputy Commissioner of Gujranwala and Dera Ghazi Khan for five years and also as an Additional Commissioner Afghan Refugees Organization for short time in 1985. He served as Additional Secretary Finance of Government of Punjab in 1988 to 1989. Later, he joined Prime Minister's Secretariat and served as Joint Secretary from 1989 to 1990.
Political career
He quit civil service and joined Pakistan Peoples Party in 1990 to begin his political career. He was appointed as political secretary to then Prime Minister of PakistanBenazir Bhutto and remained Spokesperson for PPP to represent the party on foreign tours. He remained close aide of Zulfikar Ali Bhutto and of Benazir Bhutto. He was elected to the Senate of Pakistan as a candidate of PPP from Islamabad in March 1994. He was re-elected to the Senate as an independent candidate from Islamabad in March 1997. He remained member of the Senate till March 2000. On 5 November 1996, he was inducted into the federal cabinet of caretaker Prime Minister Malik Meraj Khalid and was appointed as Federal Minister for Food, Agriculture and Livestock. On 12 November, he was given additional ministerial portfolio of Ministry of Environment, Urban Affair Forestry and Wildlife. On 25 November, he was given additional ministerial portfolio of Ministry of Environment, Local Government and Rural Development. He served as Minister for Food, Agriculture and Livestock till 15 December 1996. He remained Minister for Environment, Urban Affair Forestry and Wildlife, and Minister for Environment, Local Government and Rural Development till 17 February 1997. He became part of military government setup following 1999 Pakistani coup d'état and served as Provincial Minister of Punjab for Information from 1999 to 2000. After his resignation, he began writing columns for an English-language newspaper The News International and used to criticize Pakistan Tehreek-e-Insaf and its chief Imran Khan. After the assassination of Benazir Bhutto, he quit PPP. He joined PTI in November 2011 and served as information secretary of PTI from December 2011 to March 2013. He was elected to the National Assembly of Pakistan from Constituency NA-126 as a candidate of PTI in 2013 Pakistani general election. He received 97,933 votes and defeated Khawaja Ahmad Hassan, a candidate of Pakistan Muslim League . In November 2015, he resigned from the post of PTI organizer in Lahore after the party's poor performance in local government elections in held in October 2015. In May 2017, he became central information secretary of PTI. He was re-elected to the National Assembly as a candidate of PTI from Constituency NA-130 in 2018 Pakistani general election. On 18 August, Imran Khan formally announced his federal cabinet structure and Mahmood was named as Minister for Federal Education and Professional Training and Minister for National History and Literary Heritage. On 20 August 2018, he was sworn in as a Federal Minister in the federal cabinet of Prime Minister Imran Khan. On 15 November 2019, he was elected as the President of UNESCO's Education Commission.