During 1996–2001, Mahmud served as the political and parliamentary affairs adviser to then prime minister Sheikh Hasina.[6] In 2001, he was appointed special assistant to then opposition leader of parliament, Sheikh Hasina.[4] He was appointed the Secretary of Environment and Forest affair of Awami League.[4]
Mahmud was appointed as the state minister for foreign affairs in January 2009 in Sheikh Hasina's cabinet but 6 months later he was moved to the position of state minister for environment and forests.[9][10][11] In November 2011, he was promoted to the full minister of environment and forest and served the position until the end of 2013.[6][12]
Mahmud was elected to parliament from Chittagong-7 in 2014 as a candidate of Awami League in an uncontested election.[13] In the election 50 percent of the seats were won without a vote as the main opposition party, Bangladesh Nationalist Party, led alliance boycotted the election.[14]
Mahmud was re-elected to parliament from Chittagong-7 in 2018 as a candidate of Awami League.[15] He had received 217,155 votes while his nearest rival from Liberal Democratic Party, Md Nurul Alam, received 6,065 votes.[15]
In September 2022, Mahmud was nominated to the Awami League Local Government Public Representative Nomination Board.[16] Secretary Md Mokbul Hossain at the Information Ministry under Mahmud was sent to forced retirement in October.[17][18]
During his tenure as Environment minister from 2009 to 2013, multiple allegations of corruption surfaced involving the allocation of climate change funds. The Bangladesh chapter of Transparency International provided with credible allegations of political influence and nepotism in distributing contracts in climate change related projects, and corruption in selecting NGOs to operate the ground works.[19] The corruption in climate projects awarded during his tenure was subject of SOAS University of London's study on corruption.[20] According to a BBC Bengali report, Hasan Mahmud acknowledged the corrupt practices and downplayed it as "comparatively less than before".[21]