Li Baochen () (718 – February 6, 781), originally named Zhang Zhongzhi (), courtesy name Weifu (), known as An Zhongzhi () during the Anshi Rebellion and Zhang Baochen () 778–779, formally the Prince of Longxi (), was a general of the Chinese rebel state Yan, 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.
Background
Zhang Zhongzhi was born in 718, during the reign of Emperor Xuanzong of Tang. He was ethnically Xi and from Fanyang Circuit (范陽, headquartered in modern Beijing), but his original lineage was not otherwise known in history. He was adopted by Zhang Suogao (), and therefore took Zhang Suogao's surname of Zhang. He was capable in horsemanship and archery in his youth and served in the military at Fanyang as well, eventually serving under the military governor (jiedushi) An Lushan. On an occasion when An visited the Tang dynasty capital Chang'an to pay homage to Emperor Xuanzong, Zhang Zhongzhi followed him to Chang'an and was kept there to be an archer in the imperial guards and given access to the palace.
During the Anshi Rebellion
An Lushan rose against Emperor Xuanzong's rule in late 755, and Zhang Zhongzhi, hearing the news, escaped from Chang'an and joined An in Fanyang. An was impressed and adopted him as a son, giving him the surname of An. Subsequently, when the rebels made a surprise raid against Taiyuan, it was An Zhongzhi who led the attack, and he was able to seize the Tang mayor of Taiyuan, Yang Guanghui (). An Lushan subsequently put him in charge of defending the key pass of Tumen (土門, in modern Shijiazhuang, Hebei). After An Lushan's subsequent death and replacement as the emperor of a new Yan state by his son An Qingxu, An Zhongzhi continued to serve under An Qingxu, who made him the prefect of Heng Prefecture (恆州, roughly modern Shijiazhuang). His service of An Qingxu lasted until 757, when Tang forces put An Qingxu under siege in Yecheng. At that time, the major Yan general Shi Siming submitted to Tang, and An Zhongzhi submitted to Tang as well, subsequently serving under Shi. Emperor Xuanzong's son and successor Emperor Suzong created An Zhongzhi the Duke of Miyun and let him remain at his post.
However, Shi did not himself remain under submission to Tang for long, and when he himself rose against Tang and claimed the Yan throne, he made An Zhongzhi a minister and had him defend the region along with Xin Wanbao (). After Shi was assassinated and succeeded by his son Shi Chaoyi in 761, An Zhongzhi refused to serve Shi Chaoyi. He had his officer Wang Wujun kill Xin and then submitted to Tang, allowing Tang forces access to the region through Tumen. Emperor Suzong's son and successor Emperor Daizong accepted his submission, gave him the imperial surname of Li, and further gave him the new personal name of Baochen (meaning "treasured subject"). He, along with fellow Yan generals Xue Song, Tian Chengsi, and Li Huaixian, were allowed to keep their territory, and he was made the military governor of Chengde Circuit (成德, headquartered in modern Shijiazhuang, Hebei), consisting of six prefectures that he controlled. Emperor Daizong also created him the Duke of Zhao.
After the Anshi Rebellion
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. As part of this alliance, Li Baochen's brother Li Baozheng () married Tian's daughter, and Li Baochen gave a daughter in marriage to Li Zhengji's son Li Na and took a daughter of Li Zhengji's to be the wife of his son Li Weicheng (). Li Baochen, however, would for a while be more submissive to the imperial government than others in the alliance, and when Zhu Xicai assassinated Li Huaixian in 768 and took over Lulong Circuit (盧龍, i.e., the circuit formerly known as Fanyang), Li Baochen attacked Zhu Xicai under the name of the Tang imperial regime, but he was repelled by Zhu, and Emperor Daizong subsequently allowed Zhu to retain Lulong Circuit.