Zhang Yi (died 3 March 264), courtesy name Bogong, was a military general of the state of Shu Han during the Three Kingdoms period of China. Born in the late Eastern Han dynasty, Zhang Yi was a 10th-generation descendant of Zhang Liang. He started his career as a scribe under the warlord Liu Bei, who founded Shu later, and gradually rose to the positions of a county prefect and commandery administrator. In the early 230s, he served as an area commander tasked with maintaining the peace in Shu's southern commanderies. In 234, he led the Shu vanguard during the Battle of Wuzhang Plains against Shu's rival state Wei. From 238 to 259, Zhang Yi steadily rose through the ranks to become one of Shu's top generals. During this time, although he strongly opposed the Shu general Jiang Wei's aggressive stance towards Wei, he still accompanied Jiang Wei on his military campaigns against Wei. In 263, he surrendered to Wei forces along with the Shu emperor Liu Shan when Wei launched a large-scale invasion of Shu. In the following year, Zhang Yi was killed by mutineers during a rebellion by the Wei general Zhong Hui. Like Liao Hua and Zong Yu, Zhang was one of few officials who served the Shu-Han state throughout its entire existence.