Soon thereafter, Li Deyu was made Tuntian Yuanwailang (屯田員外郎), a low-level official at the ministry of public works (工部, Gongbu), and continued to be imperial scholar.
Li Deyu was then promoted to be Kaogong Langzhong (考功郎中), a supervisory official at the ministry of civil service affairs (吏部, Libu), and put in charge of drafting edicts.
Meanwhile, Li Zongmin's junior colleague at the legislative bureau, Yang Rushi (楊汝士) and the deputy minister of rites (禮部侍郎, Libu Shilang) Qian Hui (錢徽) were in charge of overseeing the imperial examinations.
The military governor Duan Wenchang (a former chancellor) and the imperial scholar Li Shen both made secret pleas to Qian for certain examinees.
However, when the results were announced, the examinees that Duan and Li Shen recommended were not given passing results, while among those passing the examinations were Zheng Lang, the brother of the examination bureau (門下省, Menxia Sheng) official Zheng Tan; Pei Zhuan (裴譔) the son of the military governor Pei Du (also a former chancellor); Li Zongmin's son-in-law Su Chao (蘇巢); and Yang Rushi's brother Yang Yinshi (楊殷士).
In 823, Emperor Muzong made a chancellor, while Li Deyu was sent out of Chang'an to serve as the governor (觀察使, Guanchashi) of Zhexi Circuit (浙西, headquartered in modern Zhenjiang, Jiangsu).
It was said that Li Deyu lived frugally, and gave the remainder of his own expense budget to the soldiers, such that while he did not give them all that much, they were satisfied, and that two years after his commission, the treasury was full again.
[5] The young Emperor Jingzong was said to be wasteful in his living style, and later in 824 he ordered that Zhexi Circuit submit a number of silver vessels for palace use.
[6] Later in 830, Li Deyu was moved from Yicheng to Xichuan Circuit (西川, headquartered in modern Chengdu, Sichuan), which had recently suffered from a Nanzhao incursion in 829 and was said to be weak in its defenses.
After his requests were granted, Li Deyu also trained the soldiers, built up the defenses of the border forts, and stored emergency food supplies, and it was said that the people of Xichuan, who were previously fearful of another Nanzhao invasion, were pacified.
[6] In 832, with Emperor Wenzong regretting his decision in the Xidamou matter, Niu resigned and was made the military governor of Huainan Circuit (淮南, headquartered in modern Yangzhou, Jiangsu).
Meanwhile, at Li Deyu's suggestion, Emperor Wenzong issued a decree that, in addition to creating his son Li Yong crown prince, also ordered that the imperial princes (who had been restricted to living inside the palace complex since the time of Emperor Xuanzong) be allowed to live outside the palace and be given commissions as local officials; that their daughters be married in a prompt manner; and that the imperial examinations no longer test on poetry.
In 841, Tiande's commander Tian Mou (田牟) and eunuch monitor Wei Zhongping (韋仲平), wanting to be credited with victories, suggested not to accept the surrender—arguing that Wamosi was a traitor as far as Wujie Khan was concerned—and to attack.
[8] Also in 842, at Li Deyu's advice, Emperor Wuzong ordered Tian to stop engaging the Huigu irregulars, but instead entice them with food supplies and send them to Hedong Circuit (河東, headquartered in modern Taiyuan, Shanxi) (so that they would not remain at Tiande and be disruptive).
Emperor Wuzong put Li Deyu in charge of drafting various rebukes against Wujie Khan and his advisors, urging them to reconsider their attacks.
Subsequently, when Emperor Wuzong considered asking Xiajiasi to return Anxi (安西, formerly headquartered in modern Aksu Prefecture, Xinjiang) and Beiting (北庭, formerly headquartered in modern Changji Hui Autonomous Prefecture, Xinjiang) Circuits—which were formerly under Tang control but which had been lost for decades—Li Deyu opposed, pointing out that it would be a logistical nightmare to place garrisons at Anxi and Beiting and supply them.
[11] With the Huigu campaign over, Li Deyu sought to revisit the Xidamou incident, which had occurred 12 years earlier—submitting a petition that painted Niu as jealous of him and causing a great injustice, and also arguing that Wei Prefecture would have served as a forward attack point against Tufan.
Li Deyu, however, argued that Zhaoyi, unlike Lulong and two other circuits north of the Yellow River—Weibo (魏博, headquartered in modern Handan, Hebei) and Chengde (成德, headquartered in modern Shijiazhuang, Hebei)—did not have a tradition of defying the imperial government, and therefore suggested that Liu Congjian's petition be denied, pointing out that allowing the Liu family to continue to hold Zhaoyi would cause other military governors to want to follow suit.
He further suggested that, in order to make sure that Weibo's military governor He Hongjing and Chengde's military governor Wang Yuankui would not assist Liu Zhen, explicit promises be made to He Hongjing and Wang that their circuits would not be interfered with, and that they would be responsible for capturing three of Zhaoyi's five prefectures east of the Taihang Mountains, thus making sure that imperial forces would not operate close to Weibo or Chengde.
Hedong headquarters, however, were out of troops, so Li Shi summoned 1,500 soldiers from the northern front, that Liu Mian had previously placed at Hengshui Fence (橫水柵, in modern Datong, Shanxi) during the Huige campaign, under the command of the officer Yang Bian (楊弁), back to Taiyuan, so that he could send them to reinforce Wang.
Li Deyu argued that Guo was untrustworthy—having been a major advocate of Liu Zhen's resistance of the imperial regime and then eventually betraying Liu—and Emperor Wuzong agreed, despite misgivings by Du Cong, then also chancellor.
Emperor Wuzong thus ordered Shi Xiong to enter Lu Prefecture and, under guise that he was going to distribute commissions to Guo and the other officers involved in Liu's death at a feast, had them rounded up and arrested.
He further had the Zhaoyi officers who had previously surrendered list Liu Zhen's collaborators and were slaughtering them in large numbers, even though Lu Jun was arguing that too many people were being innocently killed.
Many advisory officials pointed out that the evidence against Wu Xiang was weak, and Emperor Wuzong sent the censors Cui Yuanzao (崔元藻) and Li Chou (李稠) to review the case.
Li Deyu was subsequently made the defender of Luoyang, and no longer carried the honorary title of Tong Zhongshu Menxia Pingzhangshi.
Emperor Xuānzong recalled Cui Yuanzao from exile and had him give an account of the case to the Office of the Imperial Censors, which subsequently submitted a report agreeing that Wu Xiang was improperly executed.
As a result, Li Deyu was further demoted and exiled to be the military advisor to the prefect of Chao Prefecture (潮州, in modern Chaozhou, Guangdong).
[16] The lead editor of the Old Book of Tang, the Later Jin chancellor Liu Xu, had this to say about Li Deyu:[3] When I, your subject, was young, I had often heard of the old people talking about the stories of the Duke of Wei.
As I read about his advice within the palace and reports in the halls, he anticipated the enemies' moves and came with tactics that led to victories, by his own mind, just like how the famed bowman Yang Youji [(養由基)] would not miss with any of his arrows; he was indeed a rarely seen talent.
Played by Lau Dan, a fictionalized version of Li Deyu was portrayed in 2009 Hong Kong's TVB television series, Beyond the Realm of Conscience.