His initial campaigns were quite successful, and Xianzong's army defeated warlords such as Liu Pi, Yang Huilin (楊惠琳) in 806 and Li Qi in 807.
In 813, after the submission of one of the key holdouts, Weibo Circuit (魏博, headquartered in modern Handan, Hebei) under Tian Xing, Emperor Xianzong appeared poised to reunite the empire, many parts of which had effectively been ruled independently by regional warlords.
[10] Emperor Xianzong's reign briefly stabilized Tang from the destructive forces of the military governors, but saw the rise of the power of eunuchs.
(There were nagging suspicions, never proven, that Xianzong's wife Consort Guo and her son Li Heng (the later Emperor Muzong) were involved.)
However, the eunuchs Ju Wenzhen (俱文珍), Liu Guangqi (劉光琦), and Xue Yingzhen (薛盈珍), all of whom were favored by Emperor Dezong and who lost their power in the new regime, summoned the imperial scholars Zheng, Wei Cigong, Li Cheng, and Wang Ya to the palace to draft an edict for Emperor Shunzong creating Li Chun as crown prince, anyway.
Zheng showed a piece of paper to Emperor Shunzong reading, "The Crown Prince should be the oldest son."
Emperor Shunzong, who was unable to speak, nodded, and an edict was thereafter issued in late spring 805 creating Li Chun crown prince.
It was said that Wang Shunwen was so concerned about Li Chun that he was heard reading from Du Fu's poem about the Shu Han regent Zhuge Liang—"He had not even succeeded in his campaigns when he died.
With imperial forces approaching Xiasui's capital Xia Prefecture (夏州), Yang was quickly killed by his own subordinate Zhang Chengjin (張承金), ending his rebellion.
[8] After Liu's and Yang's destruction, another warlord, Li Qi the military governor of Zhenhai Circuit (鎮海, headquartered in modern Zhenjiang, Jiangsu) became apprehensive, and, as a means of showing loyalty, requested to go to Chang'an to pay homage to Emperor Xianzong.
He did not actually intend to do so, however, and after Emperor Xianzong not only approved, but issued an edict summoning him when he did not depart Zhenhai immediately, rebelled against the imperial government.
The officials that Emperor Xianzong put in charge of the examinations, Yang Yuling (楊於陵) and Wei Guanzhi ranked them high.
However, after Wang Chengzong reneged on his promise, Emperor Xianzong commissioned the eunuch Tutu Chengcui to command the imperial troops to attack Chengde.
Emperor Xianzong, seeing that the campaign was making no advances, ended it and made Wang the military governor of Chengde.
Also in the aftermaths of the Chengde campaign, Tutu Chengcui was demoted and, later, after he was involved in a corruption scandal, sent out of the capital to serve as the eunuch monitor for Huainan Circuit (淮南, headquartered in modern Yangzhou, Jiangsu).
[19] In 811, at Li Jifu's suggestion, Emperor Xianzong appointed several officials—Duan Pingzhong (段平仲), Wei Guanzhi, Xu Mengrong (許孟容), and Li Jiang—to review the governmental structure, to streamline it, reduce the number of officials who were not carrying out any crucial tasks, and revise the officials' wage scale.
Li Shidao thereafter retained a group of assassins to carry out guerilla warfare tactics around the eastern capital Luoyang, to try to disrupt the campaign against Zhangyi and to create a sense of terror among the officials and the people.
In summer 814, assassins that Li Shidao sent killed Wu Yuanheng and wounded Pei, terrifying the officials and the people at Chang'an.
Meanwhile, Pei Du volunteered to head to the Zhangyi front to oversee the operation, and Emperor Xianzong agreed.
Later in the year, Li Su the military governor of Tangsuideng Circuit (唐隨鄧, headquartered in modern Zhumadian) launched a surprise attack against Zhangyi's capital Cai Prefecture (蔡州), catching its defenders off guard and capturing it, seizing Wu Yuanji.
In 818, Wang offered to surrender two prefectures to imperial control and send his two sons to Chang'an to serve as hostages.
[22] Meanwhile, it was said that after the victory over Zhangyi, Emperor Xianzong began to be arrogant and extravagant in his lifestyle, and he favored such officials as Huangfu Bo and Cheng Yi, whom he believed to be capable of increasing revenues for palace use.
[6][22] In spring 819, there was an occasion when Emperor Xianzong had what was alleged to be Gautama Buddha's finger bone escorted from a temple in Fengxiang (鳳翔, in modern Baoji, Shaanxi) to the palace in a grand ceremony, kept the bone in the palace for three days, and encouraged the people to worship it and make donations to the temples.
Liu responded by launching a surprise attack on Pinglu's capital Yun Prefecture (鄆州), capturing Li Shidao and his sons and executing them, delivering their heads to Chang'an.
It was said, however, that Chen's eunuch colleagues declared that Emperor Xianzong had died from Chinese alchemical elixir poisoning due to the medicines that he was taking.