Zhang Yi returned to Chengdu on 29 February 264 with Zhong Hui and the others. Over the next few days, with Jiang Wei's support, Zhong Hui plotted a rebellion against the Wei regent Sima Zhao. On 3 March, a mutiny broke out when some of Zhong Hui's officers who were unwilling to participate in the rebellion turned against their superior and killed him and Jiang Wei. Zhang Yi also lost his life during the chaos.