Li Huaixian (李懷仙) (died July 8, 768) 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 government structure, 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.
It is not known when Li Huaixian was born, but it is known that he was from Liucheng (柳城, in modern Chaoyang, Liaoning) 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 (營州, i.e., Liucheng). 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 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.