was made an attendant scholar to the studies of the crown prince Li Heng and other imperial princes, along with Li Ju (李巨). In 814, he was made Zhongshu Sheren (中書舍人), a mid-level official at the legislative bureau (中書省, Zhongshu Sheng). In 816, he was put in charge of the imperial examinations for that year. Later that year, he was made Menxia Shilang (門下侍郎), the deputy head of the examination bureau, and de facto chancellor with the title Tong Zhongshu Menxia Pingzhangshi (同中書門下平章事); he was also given the honorary title of Chaoyi Daifu (朝議大夫). According to the Old Book of Tang, Li Fengji was treacherous and used his machination to harm others. In 817, by which time Emperor Xianzong was waging two simultaneous campaigns against warlords — Wang Chengzong, who controlled Chengde Circuit (成德, headquartered in modern Shijiazhuang, Hebei), and Wu Yuanji, who controlled Zhangyi Circuit (彰義, headquartered in modern Zhumadian, Henan) — Li Fengji advocated ending the campaign against Chengde and concentrating on the campaign against Zhangyi. Emperor Xianzong agreed, and ordered the troops then attacking Chengde to withdraw back to their own circuits. Later in the year, Li Fengji further advocated ending the campaign against Zhangyi as well, but Emperor Xianzong accepted the advice of Li Fengji's fellow chancellor Pei Du and further, as Pei volunteered, sent Pei to the front to oversee the campaign. Pei was concerned that Li Fengji and the imperial scholar Linghu Chu would work together to interfere the campaign, and therefore accused Linghu of using inappropriate language on the edict for Pei's commission and had Linghu demoted. Later in the year, both because of Li Fengji's disagreements with Pei, whom Emperor Xianzong trusted, and because Emperor Xianzong wanted to commission an associate of his while he was still an imperial prince, Zhang Su (張宿), as a high-level consultant and Li Fengji strenuously objected, Emperor Xianzong sent Li Fengji out of the capital Chang'an, making him the military governor of Dongchuan Circuit (東川, headquartered in modern Mianyang, Sichuan. During Emperor Muzong's reign After Emperor Xianzong died in 820 and was succeeded by Li Heng (as Emperor Muzong), Li Fengji was moved to be the military governor of Shannan East Circuit (山南東道, headquartered in modern Xiangfan, Hubei) as well as the prefect of its capital Xiang Prefecture (襄州). As he had previously attended to Emperor Muzong's studies, he sent messengers to plead with Emperor Muzong's