In 814, when Emperor Dezong's grandson Emperor Xianzong was emperor, Zhang Hongjing was recalled to Chang'an and made the minister of justice (刑部尚書) as well as chancellor de facto with the title of Tong Zhongshu Menxia Pingzhangshi (同中書門下平章事).
In 819, after Han Hong the military governor of Xuanwu Circuit (宣武, headquartered in modern Kaifeng, Henan) went to Chang'an to pay homage to Emperor Xianzong and then requested to remain at Chang'an, Zhang was made the military governor of Xuanwu and continued to carry the honorary chancellor title.