Li Huaixian was a general of the Chinese rebel state Yan, who later submitted to and became a general of Tang Dynasty, from which Yan had rebelled. As was in the case of several other Yan generals who submitted to Tang but who had substantial army and territorial holdings, Li was allowed to retain his command and territory, semi-independent of the Tang imperial governmentstructure, but unlike the others, he was unable to hold on to power for long and was assassinated in 768 by his subordinates Zhu Xicai, Zhu Ci, and Zhu Tao.
Background
It is not known when Li Huaixian was born, but it is known that he was from Liucheng and that he was of Xiongnu stock. His family had served the Khitan for generations, but he became a subject of Tang Dynasty and became a Tang military officer at Ying Prefecture. He later served under the Tang general An Lushan.
An Lushan rebelled against the rule of Emperor Xuanzong of Tang in late 755, and Li Huaixian, serving under An, participated in An's campaign to capture Tang's central territories, on which An established a state of Yan as its emperor. In spring 756, Li participated in the campaign led by fellow Yan general Linghu Chao against the city ofYongqiu, defended by the Tang general Zhang Xun, but the Yan generals were unable to capture Yongqiu and eventually forced to withdraw. He later successively served under the next three Yan emperors – An Lushan's son An Qingxu, An Lushan's major general Shi Siming, and Shi Siming's son Shi Chaoyi. After Shi Chaoyi had succeeded to the Yan throne after assassinating his father Shi Siming in 761, he made Li the mayor of the key city Fanyang. According to the Tang Dynasty historian Ping Zhimei, whose Jimen Jiluan is no longer extant but is often cited in other works, when Li arrived at Fanyang, Fanyang was in a state of disturbance after various Yan generals in Fanyang had fought and killed each other in street battles in the confusion after Shi Siming's death, and it was Li who put down the disturbance and restored order. After a joint Tang and Huige army decisively defeated Shi Chaoyi and recaptured Shi Chaoyi's capital Luoyang, Shi Chaoyi fled north toward Fanyang. Before Shi Chaoyi reached Fanyang, however, Li sent messengers to the powerful Tang eunuch Luo Fengxian and offered to submit to Tang. He sent his subordinate Li Baozhong to Fanyang County to block off Shi Chaoyi's path, and Shi Chaoyi, after being unable to capture Fanyang County, fled further north. Li Huaixian sent an army to pursue him, and Shi Chaoyi, believing the situation to be hopeless, committed suicide. Li Huaixian cut off Shi Chaoyi's head and presented it to Emperor Xuanzong's grandson Emperor Daizong, ending the Anshi Rebellion.
After the Anshi Rebellion
After Li Huaixian's submission, the Tang imperial government was hesitant to move them, fearing another rebellion, and at the suggestion of the general Pugu Huai'en, Li Huaixian, along with fellow Yan generals Xue Song, Li Baochen, and Tian Chengsi, were allowed to keep their territory, and he was made the military governor of Lulong Circuit, consisting of six prefectures that he controlled. The four former Yan generals formed alliances among themselves, as well as with two other military governors, Li Zhengji and Liang Chongyi, hoping to be able to pass their territories to their descendants, semi-independent of the Tang imperial government, retaining their armies and taxes without submitting them to the imperial government. However, in summer 768, Li Huaixian's subordinates Zhu Xicai, Zhu Ci, and Zhu Ci's brother Zhu Tao, jointly rose against Li Huaixian and killed him. Zhu Xicai took over command of the circuit. Li Baochen, who was friendly with Li Huaixian and who lamented Li Huaixian's death, sent an army to attack Zhu Xicai, but was defeated by Zhu Xicai. The Tang imperial government was subsequently forced to recognize Zhu Xicai as the new military governor.