Li served most of his career in the mid and late 220s as the area commander for the Eastern Front centered in Yong An with Chen Dao as his deputy; he never faced any major battles in his position.
During his youth, Li Yan worked as a civil clerk in Jing Province (covering present-day Hubei and Hunan) under the provincial governor Liu Biao, and had earned himself a reputation of being competent.
Later, when the warlord Liu Bei invaded Yi Province, Li Yan was assigned as an army controller after initial resistance proved futile.
[3] After Liu Bei conquered Yi Province, Li Yan was appointed as the Administrator (太守) of Qianwei Commandery (犍為郡) and General Who Revives Glory (興業將軍), as a follow-up solidification of the new regime.
)[4] Li Yan continued to prove his talent as a commandery administrator — several major civil projects were initiated and conducted under his leadership: a tunnel was dug through Mount Tianshe, roads along rivers were repaired, infrastructures within his jurisdiction were decorated and rebuilt.
[9] In 222, Liu Bei suffered a devastating defeat to the eastern warlord, Sun Quan, at the Battle of Xiaoting and died not long later in Baidicheng.
Gao Ding and Meng Huo also fanned the uprising and the campaign became a major revolution, which prompted Zhuge Liang to retaliate with military force.
[12] After his successful southern subjugation and repair of the Wu–Shu alliance, Zhuge Liang, utilising his huge bureaucratic power and influence, carried out a series of human resource rearrangement.
After prescribing several officers as palace attendants for the young emperor, Zhuge Liang continued to spend considerable effort in strengthening ties with Wu.
In a letter to the recently defected Meng Da, Li Yan wrote that both Kongming and he were entrusted with a difficult task and a lot of responsibilities follows it.
In that case, I would accept even ten bestowments, all the more for nine!”[18]In August 230, the Wei general Cao Zhen launched a punitive campaign against Shu as a form of retaliation against Zhuge Liang's previous attacks.
Instead, Zhuge Liang included Li Yan as a member of his cabinet, granting the latter access to the Imperial Chancellor's office to help prepare for future campaigns against Wei.
[20] As the fourth expedition dragged on for months, Zhuge Liang and the Wei general Sima Yi had been having a series of battles around Mount Qi, and both sides needed backup supplies.
However, rainfall rendered the transportation lines impassable, and Li Yan failed to provide supplies to Zhuge Liang's camp.
When Zhuge Liang got back to Hanzhong Commandery, Li Yan told him that the food supply was ready and asked him why he retreated.
At the same time, Li Yan sent Liu Shan a memo which says "the army feigned retreat in order to lure the enemy to do battle", hoping that Zhuge Liang would resume the war so his failure to transport supplies would go unnoticed.
Then, Zhuge Liang asked Liu Shan to strip Li Yan off all of his titles and official posts and exile him to Zitong Commandery.
There, Li Yan lived the rest of his life as a civilian until he heard the news of Zhuge Liang's death in 234, after which he became ill and died.