During this period, Wei Yan repeatedly asked Zhuge Liang to command 10,000 soldiers for him and tackle key problems all the way. Finally, he joined forces with Zhuge Liang in Tongguan, just like Han Xin's example, but Zhuge Liang never allowed him to do so, so he thought he could not give full play to his talents and was dissatisfied. After Zhuge Liang's death, the contradiction between them intensified, fighting for power and profit. Wei Yan was defeated and fled, and was chased by Ma Dai, destroying the three clans.
The extended information "The History of the Three Kingdoms" records: "Those who returned to the south without falling to Wei in the north tried to kill Yi." Hao Jing of the Yuan Dynasty believed that Yang Yi "killed a general in a rage and deserved it".
The above is the record of the biography of Chen Shou, the author of The Three Kingdoms. However, according to Wei Lue quoted by Pei, Wei Yan was entrusted with military power by Zhuge Liang. Yang Yi was afraid that Wei Yan would take the opportunity to harm the other side, so she made a rumor that Wei Yan would go north to defect and send troops to attack. However, Wei Yan, who was framed, was afraid of war and innocent, so he only fled without fighting and was finally hunted down. Pei Songzhi thinks that this statement is a rumor of Cao Wei, and Chen Shou's The Three Kingdoms of Shu and Han is more credible.
Baidu Encyclopedia-Wei Yan