Yang Yi, courtesy name Weigong, was a native of Xiangyang. During the Jian'an era he became Registrar to Fu Qun, Inspector of Jing Province, but he turned his back on Fu Qun and went over to Guan Yu, Administrator of Xiangyang. Guan Yu made him Officer of Merit and sent him west as an envoy to Liu Bei. Liu Bei discussed with him plans for military and state affairs and the merits and failings of government, and was so delighted that he summoned him as Officer of the Bureau of Military Affairs under the General of the Left; when Liu Bei became King of Hanzhong, he promoted Yang Yi to Master of Writing. Records, Shu 10 §67
When Liu Bei proclaimed himself emperor and marched east against Wu, Yang Yi was on bad terms with the Director of the Imperial Secretariat, Liu Ba, and was demoted, being appointed in absentia as Administrator of Hongnong. In the 3rd year of Jianxing (225) the Chancellor Zhuge Liang made him Army Adviser and put him in charge of the affairs of the Chancellor's office; Zhuge Liang was then about to go south. In the 5th year of Jianxing (227) he followed Zhuge Liang to Hanzhong, and in the 8th year of Jianxing (230) he was transferred to Chief Clerk with the added title of General Who Pacifies the Army. Records, Shu 10 §68
Each time Zhuge Liang took the field, Yang Yi planned the disposition of units and calculated the provisions, accomplishing it in a moment without long deliberation. The procedures and direction of the army were left to Yang Yi to handle. Zhuge Liang deeply valued Yang Yi's ability and relied on Wei Yan's valor, so although he always regretted that the two could not get along, he could not bring himself to cast either aside. Records, Shu 10 §68–69
People of the time all avoided the arrogant Wei Yan and deferred to him, but Yang Yi alone gave Wei Yan no ground at all, and the two were like water and fire. Whenever they sat together they quarreled, and when Wei Yan sometimes raised his sword at Yang Yi, Yang Yi wept streams of tears. Each time Fei Yi stepped in between them, admonishing and separating them, so that as long as Zhuge Liang lived he was able to use both men. Records, Shu 10 §59Records, Shu 14 §24
In the 12th year of Jianxing (234) Yang Yi followed Zhuge Liang out to encamp at Gukou. In the autumn, when his illness became critical, Zhuge Liang secretly settled with the Chief Clerk Yang Yi, the Marshal Fei Yi, the Protector of the Army Jiang Wei and others the procedure for withdrawing the army after his death: Wei Yan was to cover the rear with Jiang Wei next, and if Wei Yan did not obey, the army was simply to leave. When Zhuge Liang died in the 8th month, Yang Yi kept the death secret and sent Fei Yi to sound out Wei Yan's intentions. Wei Yan said that the men of the Chancellor's office could escort the coffin home, while he would lead the armies to attack the enemy; how could he be put under Yang Yi's command as a rearguard general? Records, Shu 10 §69 · 61–62Records, Shu 3 §15
When Yang Yi and the others sent the various camps back one after another according to the plan Zhuge Liang had laid down, Wei Yan was furious and, before Yang Yi had set out, went south ahead of him, burning and cutting the plank roads wherever he passed. Wei Yan and Yang Yi each memorialized that the other had rebelled, and urgent dispatches arrived one after another within a single day; when the Later Sovereign, Liu Shan, asked Dong Yun and Jiang Wan, both vouched for Yang Yi and suspected Wei Yan. Yang Yi and the others cut trees on the mountains to open a road and marched day and night following behind Wei Yan, and when Wei Yan seized the mouth of the Southern Valley and attacked them, they put He Ping (Wang Ping) in front to hold him off. Records, Shu 10 §62–63
At He Ping's rebuke Wei Yan's soldiers scattered, and Wei Yan fled to Hanzhong with a few of his sons. Yang Yi sent Ma Dai to pursue and behead him, and when Ma Dai presented the head, Yang Yi rose and trampled on it himself, saying, "Wretch! Can you do evil again?" Wei Yan's three sets of kin were exterminated, and Yang Yi led the armies back to Chengdu. Records, Shu 10 §64Records, Shu 3 §15
Yang Yi believed that, having brought the army back and also put down Wei Yan, his merit was very great and he ought to take charge of the government in Zhuge Liang's place. He summoned the Commandant Zhao Zheng to divine by the Book of Changes, and when the hexagram Jiaren (The Family) came up, he fell silent and was displeased. But during his lifetime Zhuge Liang had judged Yang Yi narrow-minded and impatient and had privately had Jiang Wan in mind, so Jiang Wan became Director of the Imperial Secretariat and Inspector of Yi Province. Yang Yi was appointed Central Military Adviser, but had nothing under his command and merely passed his time idly. Records, Shu 10 §69–70
Earlier, when Yang Yi was Master of Writing under Liu Bei, Jiang Wan had been a Gentleman of the Masters of Writing. Later both became the Chancellor's Army Adviser and Chief Clerk, but Yang Yi always accompanied the campaigns and bore the heavy work. Considering himself ahead of Jiang Wan in age and official seniority and superior in ability, he let his resentment and anger show in his voice and face. People feared his unrestrained words and dared not go near him; only Fei Yi, Military Adviser of the Rear, went to console him. Yang Yi told Fei Yi, "When the Chancellor died, had I taken the army over to the Wei, I would not have fallen so low as this," and said that now it was too late to undo, however much he regretted it. Records, Shu 10 §71–72
Fei Yi secretly reported his words in a memorial. In the 1st month of the 13th year of Jianxing (235), Yang Yi was deposed to the status of a commoner and moved to Hanjia Commandery. On reaching the place of exile Yang Yi again submitted a letter of slander, and as its language was vehement, an order was at last sent down to the commandery to arrest him. Yang Yi killed himself, and his wife and children returned to Shu. The Records do not separately state the year of his death. Records, Shu 10 §72Records, Shu 3 §16
In his assessment, Chen Shou said that Yang Yi gained renown in office and, together with the other figures in this volume, was held in high esteem, but that when one examines his conduct, the calamity he invited and the blame he incurred all came from himself. Yang Xi's Eulogies of the Supporting Officials of Ji Han said that he was quick-tempered and narrow, unlike other men; when at ease he kept to reason, but when pressed he harmed and encroached upon others, abandoning compliance and entering into ill fortune. Records, Shu 10 §74Records, Shu 15 §62