After being transferred to Beijing, Zhang was deputy party secretary of Huairou County (now Huairou District) and subsequently governor of Huairou District in May 2002.[4] He became governor of Shunyi District, in October 2006, and then party secretary, the top political position in the district, beginning in March 2009.[4] He was appointed vice mayor of Beijing in January 2013, concurrently serving as deputy secretary of the Political and Legal Affairs Commission of the CCP Beijing Municipal Committee.[4] He rose to secretary of the Political and Legal Affairs Commission in October 2015 and was admitted to standing committee member of the CCP Beijing Municipal Committee, the province's top authority.[4] He was deputy party secretary of Beijing in November 2020, in addition to serving as president of the CCP Beijing Municipal Party School.[4] In January 2022, he was chosen as vice chairperson of the Beijing Municipal People's Congress.[5] In August 2022, he was proposed as president of the Beijing Federation of Trade Unions, succeeding Wei Xiaodong.[6]