Li Yan and Zhuge Liang were the only two ministers Liu Bei had when he was alone in Yong'an. Liu Bei handed over government affairs to Zhuge Liang and the army to Li Yan. Later, however, under the impeachment of Zhuge Liang, Liu Chan deposed Li Yan as a Shuren. So, was Li Yan deposed by his own death, or was he squeezed out by Zhuge Liang?

(Li Yan stills)
Historical records record that Li Yan himself died and was deposed. There are three main things he did to die:
First, in the fourth year of Jianxing (Liu Chan's first era name), when Zhuge Liang was preparing for the Northern Expedition, he transferred Li Yan to Hanzhong to defend, Li Yan did not go, and also asked Zhuge Liang to combine the five counties into one Bazhou and make him the history of Bazhou (at that time he was himself the history of Jiangzhou).
Second, in the eighth year of Jianxing, when the Cao Wei general Cao Zhen's three-way army attacked Hanchuan, Zhuge Liang sent Li Yan to Chi Aid again, but he did not go, saying that Sima Yi of Cao Wei would take advantage of the void. Later, Zhuge Liang put his son in charge of the defense of Jiangzhou and promoted him to the rank of General of the Hussars, and he went.
Third, in the ninth year of Jianxing, during Zhuge Liang's Northern Expedition, Li Yan was responsible for the escort of grain and grass, and because the roads were muddy, he was afraid of being punished for delaying the time and letting Zhuge Liang retire. After Zhuge Liang withdrew from the army, he said in front of Liu Chan that there was plenty of grain and grass, and he did not know why Zhuge Liang would retreat? Zhuge Liang showed Li Yan's letter to Liu Chan and took the opportunity to impeach him. As a result, Liu Chan deposed him as a Shuren.
Although the historical records record that Li Yan was deposed by his own death. However, there is one thing that makes me wonder: Obviously, Liu Bei handed over the army to Li Yan, so why did he finally become Zhuge Liang's commander-in-chief?
I think that by clarifying this question, we can figure out the question of whether Li Yan was squeezed out by Zhuge Liang.
After Liu Bei lost the Battle of Yiling and retreated to Yong'an, due to his deteriorating health, he began to consider the problem of arranging the aftermath. Among these considerations, an important measure was to transfer Li Yan from the post of Taishou to Yong'an as Shang Shuling. During the Eastern Han Dynasty and the Three Kingdoms period, Shang Shuling was not exactly the prime minister, but because it directly carried out the emperor's orders, it was similar to the prime minister. Liu Bei made Li Yan the shang shu ling, that is, to consider entrusting the orphan Zhuge Liang in the future, and then entrusting the orphan to Li Yan, using Li Yan to balance Zhuge Liang, so as to prevent Zhuge Liang from becoming a powerful minister.
Let's look at how Li Yan, who was originally assigned by Liu Bei to take charge of the army, lost the command of the army after Liu Bei's death.
(Liu Beituo)
Li Yan was in charge of the army, and Liu Bei gave him the position of Zhongdu Protector. "Du" means all, and "protection" means to lead the guards, so "Zhongdu Hu" means to control all the armies inside and outside.
However, after Liu Bei's death, one thing happened, that is, according to the records of the Romance of the Three Kingdoms: "Mu Mu Tai Shou Zhu Bao Yong County Rebellion. First, Yizhou County had the surname Yong Min rebelled, Liu Taishou Zhang was of Wu descent, according to the county, Yue Junyi King Gao Ding also betrayed..." That is to say, almost half of the shu Han dynasty had rebelled.
In this way, it is necessary to use the army to quell the chaos. Although Li Yan was the protector of Zhongdu, at that time Liu Bei arranged for him to guard Yong'an. Zhuge Liang also suggested to Liu Chan that Li Yan continue to guard Yong'an. Indeed, it is also impossible not to guard the town, because Yong'an is the gateway against Eastern Wu, the Battle of Yiling has been lost, if it is not guarded again, then Eastern Wu will take advantage of the void. Therefore, it can be said that although Li Yan was a Zhongdu Protector, he could not return to Chengdu, so he could not exercise the power of Zhongdu Protector. Commanding the army to quell the chaos can only be handed over to The Prime Minister Zhuge Liang.
After Zhuge Liang commanded the army to quell the rebellion, Zhuge Liang proposed to Liu Chan that he would inherit Liu Bei's legacy and swear to teach the Northern Expedition. Before the Northern Expedition, we must first march south to stabilize the south. Of course, the matter of the Southern Expedition can only be handed over to Zhuge Liang. So Liu Chan handed over the army to Zhuge Liang in the third year of Jianxing and asked him to lead the army to the south. In this way, in fact, Li Yan's Zhongdu Protector has no real name.
After Zhuge Liang returned from the southern expedition, he immediately embarked on the Northern Expedition. At this time, Zhuge Liang made a decision, that is, as mentioned earlier, in the fourth year of Jianxing, Zhuge Liang ordered Li Yan to be transferred to Hanzhong to be responsible for the town defense of Hanzhong and logistical support, and Zhuge Liang himself wanted to command the Northern Expedition.
(Zhuge Liang stills)
Perhaps at this time, Li Yan's heart was already very dissatisfied. In his opinion, Zhuge Liang easily took command of the entire army of Shu Han from him, and now he was transferred to Hanzhong, which was equivalent to taking away his base area as well. Therefore, he resolutely did not go, and also asked Zhuge Liang to combine the five counties to form Bazhou, and he was not only the history of The Assassin of Jiangzhou, but also the History of the Assassin of Bazhou. In doing so, he simply wanted to expand his territory and establish a larger base area. Of course, Zhuge Liang did not listen to him.
After that, Zhuge Liang's first Northern Expedition in the sixth year of Jianxing until his death, the army has been firmly in his hands, Li Yan is only a general. Moreover, in the eighth year of Jianxing, Zhuge Liang transferred him to Hanzhong again, and this time he could no longer push him off. In the ninth year of Jianxing, because of the "grain and grass incident" mentioned earlier, Li Yan falsely accused Zhuge Liang in front of Liu Chan, but in fact he was still struggling for the last time, hoping to take Zhuge Liang down. Unexpectedly, his methods were too inferior, and Zhuge Liang had sufficient evidence to prove that he was making false accusations. As a result, Li Yan declared defeat and was deposed as a Shuren.
From the analysis above, we can see. Zhuge Liang was indeed squeezing out Li Yan and turning Li Yan's command of the army into his own. However, in this process, what Zhuge Liang did was done for the common good everywhere and everywhere from the overall situation of the country. Li Yan, on the other hand, is selfish everywhere and considers his own small interests everywhere. Therefore, in the end, he had to lose at the hands of Zhuge Liang.
(Reference: Romance of the Three Kingdoms)