In imperial service Li Xilie subsequently drew favors from Emperor Dezong by repeatedly suggesting to Emperor Dezong, who had wanted to wipe out the
de facto independence of several circuits — Pinglu (the original territory of which had been abandoned and whose headquartered had moved to modern
Tai'an,
Shandong), ruled by
Li Zhengji; Weibo (魏博, headquartered in modern
Handan,
Hebei), ruled by
Tian Yue; Chengde (成德, headquartered in modern
Shijiazhuang,
Hebei), ruled by
Li Baochen; and Shannan East (山南東道, headquartered in modern
Xiangfan,
Hubei), ruled by
Liang Chongyi — that he be allowed to attack Liang and take Shannan East Circuit back for the imperial government. In 781, after Li Baochen died, Emperor Dezong refused to let his son
Li Weiyue inherit his position, and the military governors of the
de facto independent circuits, who were aligned with each other, then prepared for war against imperial causes. However, Liang was in the worst strategic position among these circuits, as his was the weakest circuit among them and was surrounded by circuits obeying imperial orders, and therefore he did not take as provocative gestures as the others. Nevertheless, Emperor Dezong, not wanting to take any chances, effectively gave Liang the choice of submission or fight by issuing an order promoting him but summoning him to the capital
Chang'an. Liang, after much deliberation, refused and planned for war. In summer 781, Emperor Dezong created Li Xilie the Prince of Nanping and put him in command of overall operations against Liang — against warnings by the
chancellor Yang Yan that, based on how Li Xilie had turned against Li Zhongchen, he could not be trusted. Instead, Emperor Dezong publicly praised Li Xilie for his loyalty — although this drew a private remark from his official Li Cheng () that he believed that Li Xilie would turn arrogant and defiant if he were to defeat Liang. Subsequently, when Li Xilie's advances were slowed by torrential rains, Yang Yan's fellow chancellor and political enemy
Lu Qi secretly suggested to Emperor Dezong that Li Xilie had slowed down due to his displeasure with Yang; as a result, Emperor Dezong removed Yang from his chancellor post. Meanwhile, Liang launched a preemptive attack against
Jiangling, hoping to capture it and gain access to the south. However, he was defeated at Siwang (四望, in modern Xiangfan) and retreated back to Shannan East's capital Xiang Prefecture. He gathered his troops and concentrated them in Xiang and Deng Prefectures, while Li Xilie gathered the forces and headed northwest on the
Han River toward Xiang Prefecture. Liang attacked some of Li Xilie's troops stationed at Linhan (臨漢, near Xiang Prefecture), slaughtering them, but subsequently, when Li Xilie's main troops arrived, Liang's generals Zhai Hui () and Du Shaocheng () was defeated by Li Xilie at Man River (蠻水, flowing through modern Xiangfan) and then Shukou (疎口, also in modern Xiangfan). Zhai and Du surrendered to Li Xilie, and Li Xilie ordered them to take their troops to enter Xiangyang (the capital of Xiang Prefecture) first. Liang ordered resistance, but his troops opened the gates and fled outside. Liang, seeing no escape, committed suicide with his wife and children by jumping into a well. Li Xilie took his body out from the well, cut off the head, and sent it to Chang'an. Li Xilie also slaughtered Liang's relatives and friends, as well as 3,000 soldiers who had participated in the Battle of Linhan. Emperor Dezong granted Li Xilie the honorary chancellor designation of
Tong Zhongshu Menxia Pingzhangshi ().
Turning against imperial rule After Li Xilie's victory over Liang, instead of turning Shannan East over to imperial authority, he began to act as if it were his private domain. Emperor Dezong, remembering Li Cheng's remarks, sent Li Cheng to Shannan East to serve as military governor — with no escorts, at Li Cheng's own request. Once Li Cheng got to Xiang Prefecture, Li Xilie initially refused to let him take over its governance and housed him at a pavilion for guests, and then tried to intimidate him with threats. Li Cheng refused to leave, and Li Xilie, unwilling to break with the imperial government at that time, allowed his soldiers to pillage Xiang Prefecture and then withdrew back to Huaixi. In 782, with imperial forces engaging the forces of Tian Yue,
Wang Wujun,
Zhu Tao (both Wang and Zhu having participated in Li Weiyue's destruction earlier but then rebelled in light of Emperor Dezong's failure to grant them territory that they wanted), and
Li Na (Li Zhengji's son, who had taken over after Li Zhengji died later in 781 as well), Emperor Dezong made Li Xilie the military governor of Pinglu, intending to have him attack Li Na. Li Xilie, however, was in secret communication with the four rebels, who had declared themselves princes independent of Tang, and he, under the guise of attacking Li Na, moved his headquarters to Xu Prefecture (許州, in modern
Xuchang,
Henan) and requested permission from
Li Mian the military governor of Yongping Circuit (永平, headquartered in modern
Kaifeng,
Henan) to pass through his territory. Li Mian, suspecting Li Xilie's intentions, granted permission but put his forces on high alert. Li Xilie, realizing that Li Mian was on guard, did not attack him. However, Li Xilie then claimed several titles that had not been granted him by Emperor Dezong — the supreme commander of the armed forces,
Taiwei (太尉, one of the
Three Excellencies), and the Prince of Jianxing. In spring 783, Li Xilie finally took more apparent provocative action against the imperial government, by capturing Ru Prefecture (汝州, in modern
Luoyang,
Henan) and its acting prefect Li Yuanping (). He then sent his forces to raid the nearby prefectures. At the suggestion of Lu Qi — who had been resentful of the senior official
Yan Zhenqing — Emperor Dezong sent Yan to Huaixi to make one final attempt to persuade Li Xilie to return to the imperial fold. Once Yan arrived at Huaixi, Li Xilie put him under house arrest, albeit at a comfortable pavilion, and refused his demands that Li Xilie return to the imperial fold. Li Xilie cut off the communication lines between Chang'an and the
Yangtze River-
Huai River region, forcing Tang official communications to go through the middle Yangtze region. His subsequent attempts to expand, however, were repelled by Tang generals Geshu Yao () and Li Gao () the Prince of Cao, and his campaign stalled. An attempt by his subordinate Zhou Zeng () to overthrow him and replace him with Yan, however, failed. In light of Zhou's failure, however, Li Xilie made one attempt to reconcile with Emperor Dezong, sending an apology that blamed his own rebellion on Zhou, and then moving his headquarters back to Cai Prefecture, where he felt more secure. For the next several months, he continued to engage imperial troops and raid the surrounding prefectures, but did not undertake any substantial maneuvers to expand. In fall 783, soldiers of Jingyuan Circuit (涇原, headquartered in modern
Pingliang,
Gansu), at Chang'an at the time in preparation for deployment to battle Zhu, Tian, Wang, and Li Na, mutinied, forcing Emperor Dezong to flee to Fengtian (奉天, in modern
Xianyang,
Shaanxi). They supported Zhu Tao's brother
Zhu Ci as their leader, and Zhu Ci soon declared himself the emperor of a new state of Qin. In the subsequent confusion, Xiangcheng (襄城, in modern Xuchang), which Geshu was defending, fell to Li Xilie, and Geshu fled back to Luoyang. Later in 783, Li Xilie attacked Li Mian's headquarters at Bian Prefecture, but could not capture it quickly enough. He forcibly conscripted civilians to participate in the siege and, when they could not complete the filling-up of the moat around Bian Prefecture on time, buried them alive, referring to them as "wet wood." Around the new year 784, Li Mian abandoned Bian Prefecture, which then fell to Li Xilie, who then moved his headquarters to Bian Prefecture. Li Mian's subordinate Li Cheng (李澄, note different character than the Li Cheng who had previously resisted Li Xilie) surrendered Hua Prefecture (滑州, in modern
Anyang,
Henan) to Li Xilie as well. The Yangtze-Huai region was all shocked by the development, and Chen Shaoyou () the military governor of Huainan Circuit (淮南, headquartered in modern
Yangzhou,
Jiangsu) sent his subordinate Wen Shu () to Li Xilie to pledge allegiance to Li Xilie. When Emperor Dezong, still at Fengtian, declared a general pardon in spring 784 — the scope of which included even Zhu Tao, Wang, Tian, Li Na, and Li Xilie and implicitly promising them that if they submitted to nominal imperial authority again, he would not dare to interfere with them again — Wang, Tian, and Li Na all renounced their self-claimed princely titles. Li Xilie refused, however, and declared himself the emperor of a new state of Chu and making
Daliang (i.e., Bian Prefecture) his capital. == As emperor of Chu ==