Li Huaixian
Li Huaixian was a general of the Chinese Yan rebel state, who later submitted to and became a general of the 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 government structure, but unlike the others, he was unable to hold on to power for long and was assassinated on 8 July 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 the Tang dynasty and became a Tang military officer at Ying Prefecture. He later served under the Tang general and military governor An Lushan.During An-Shi Rebellion
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 of Yongqiu, 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.