Yang Yi was from XiangyangCommandery in Jing Province, which is around present-day Xiangyang, Hubei. He was born sometime in the late Eastern Han dynasty and initially served as a Registrar under Fu Qun, the Inspector of Jing Province. However, later, he defected to Guan Yu, a general under the warlordLiu Bei. Guan Yu appointed Yang Yi as an Officer of Merit and sent him to Chengdu – the capital of Yi Province, which covered present-day Sichuan and Chongqing – to meet Liu Bei. Liu Bei had a discussion with Yang Yi on military strategy and politics and was so pleased with his replies that he appointed Yang Yi as a Senior Clerk in his administrative office. He promoted Yang Yi to a Master of Writing in 219 after declaring himself "King of Hanzhong" following his victory in the Hanzhong Campaign. In 221, Liu Bei declared himself emperor and founded the state of Shu Han to challenge Cao Pi's claim to the Han throne. In the following year, when Liu Bei was away on a military campaign against his ally-turned-rival Sun Quan, Yang Yi offended Liu Ba, the Prefect of the Masters of Writing. Liu Ba reassigned Yang Yi to be the Administrator of Hongnong Commandery ; this was only a nominal appointment because Hongnong Commandery was not Shu territory.
Mid career
After Liu Bei's death in 223, Yang Yi continued serving in Shu under Liu Bei's son and successor, Liu Shan, who was assisted by the Imperial Chancellor, Zhuge Liang. In 225, Zhuge Liang had Yang Yi transferred to the Imperial Chancellor's Office, where Yang Yi served as an Army Adviser. Later that year, Yang Yi followed Zhuge Liang on a campaign against some rebel forces and restless tribes in the southern parts of Shu. In 227, he accompanied Zhuge Liang to Hanzhong Commandery. In 230, he was promoted to Chief Clerk and appointed as General Who Pacifies the Army. Over the following years, when Zhuge Liang led a series of military campaigns against Shu's rival state Cao Wei, Yang Yi was in charge of managing human resources and logistics. Yang Yi had disagreements with Wei Yan, a senior Shu general, and frequently quarrelled with him. Wei Yan often drew his sword and brandished it in front of Yang Yi; Yang Yi sobbed as tears rolled down his cheeks. Fei Yi then stepped in to stop them from fighting and managed to keep them under control until Zhuge Liang's death. Zhuge Liang was upset by the lack of harmony between Yang Yi and Wei Yan, but was unwilling to side with either of them because he appreciated the talents of both men. In 234, Yang Yi followed Zhuge Liang on another campaign against Cao Wei which led to the stalemate at the Battle of Wuzhang Plains. Zhuge Liang died of illness during the standoff, after which Yang Yi and the others ordered a retreat back to Shu. Around this time, relations between Yang Yi and Wei Yan deteriorated the point of conflict – they accused each other of treason and nearly started a civil war in Shu. The conflict concluded with the downfall and death of Wei Yan.
After returning to Chengdu, Yang Yi thought that he had made great contributions so he strongly believed that he would be chosen to succeed Zhuge Liang as the new head of the Shu government. He asked one Zhao Zheng to use the I Ching to predict his fortune for him and felt gloomy when the prediction was not to his expectation. When Zhuge Liang was still alive, he had secretly noted that Yang Yi was impulsive and narrow-minded, so he chose Jiang Wan to be his successor. After Zhuge Liang's death, Jiang Wan was appointed as the Prefect of the Masters of Writing and the Inspector of Yi Province; Yang Yi, on the other hand, was appointed as a Central Military Adviser – an appointment with no actual power. Initially, when Yang Yi was serving as a Master of Writing, Jiang Wan ranked lower than him, but both of them were later appointed as Chief Clerks under Zhuge Liang. Yang Yi viewed himself highly and saw himself as superior to Jiang Wan because he had been serving in Shu longer than Jiang Wan. He openly expressed his dissatisfaction by grumbling and complaining. The others ignored him due to his poor choice of words in conveying his frustration except Fei Yi, who comforted him. Yang Yi once told Fei Yi, "When the Imperial Chancellor died, I should have brought along my men and defected to Wei if I knew I'd end up in this situation today! I deeply regret but there's nothing I can do now." Fei Yi secretly reported Yang Yi's speech to the Shu government. In 235, Yang Yi was removed from office, demoted to the status of a commoner, and exiled to Hanjia Commandery. While he was in Hanjia Commandery, Yang Yi wrote a memorial to the Shu imperial court and used emotionally charged language to express his frustration and lash out at the imperial court. The imperial court found Yang Yi guilty of contempt of imperial authority and ordered his arrest. Yang Yi committed suicide. His family returned to Chengdu after his death.
Yang Lü
Yang Yi had an elder brother, Yang Lü, whose courtesy name was Weifang. Yang Lü was already known for his good moral conduct in his youth and was regarded as a learned scholar in the Jing Province region. He received several invitations to serve in the government but declined all of them. He died at the age of 16. His fellow townsfolk referred to him as "Lord Yang of Virtuous Conduct".