Early in Emperor Dezong's Zhenyuan era (785–805), Zheng was recalled to the capital Chang'an and served successively as Bingbu Yuanwailang (兵部員外郎), a low-level official at the ministry of defense (兵部, Bingbu); and Kubu Langzhong (庫部郎中), a supervisorial official at the ministry of census (戶部, Hubu).
In 797, he was made the deputy minister of public works (工部侍郎, Gongbu Shilang) but was also put in charge of selecting officials at the ministry of civil service (吏部, Libu).
When Lu reported this to Emperor Dezong, Emperor Dezong ordered that a tribunal be convened that would include the deputy chief imperial censor Yuwen Miao (宇文邈), the deputy minister of justice Zhang Yu (張彧), the chief judge of the supreme court Zheng Yunkui (鄭雲逵), and a supervisor from the ministry of Buddhist and Taoist affairs, Zhuge Shu (諸葛述).
Further, at that time, there was a senior secretary at the legislative bureau, Hua Huan (滑渙), who was closely associating with the powerful eunuch Liu Guangqi (劉光琦) such that whatever Hua suggested, due to his seniority and powerful connections, the other chancellors Du You and Zheng Yin would usually not dare to oppose it.
[9] However, when Hua was found to be corrupt later that year and executed, Emperor Dezong, finding out that Zheng had rebuked Hua previously, was pleased with Zheng and made him Guozi Jijiu (國子祭酒), the principal of the imperial university, and soon made him the mayor of Henan Municipality (河南, i.e., the eastern capital Luoyang).
[4] It was said that because both times that Zheng was removed from his chancellor position were not due to major faults of his, his opinion continued to carry great weight.
His words were so stern that they offended the officials in power at the time, and he was made an advisor to the new crown prince Li Heng, also acting at the minister of worship (太常卿, Taichang Qing).
(The use of drums had been discontinued since the rebellions of Zhu Ci and Li Huaiguang during Emperor Dezong's reign, to avoid alarming the people of Chang'an.
)[4] In 814, Zheng was made the military governor of Shannan West Circuit as well as the mayor of its capital Xingyuan Municipality (興元).
Around that time, because Emperor Xianzong had issued multiple mass promotions of officials, it was said that high ranks were becoming overly granted.
It was said that for a long time, there had not been appropriate officials serving as the heads of the executive bureau, and that after Zheng was named to that post, the people were impressed.