Zhang Yi (張鎰) (died November 8, 783), courtesy names Jiquan (季權) and Gongdu (公度), was an official of the Chinese dynasty Tang Dynasty, briefly serving as a chancellor during the reign of Emperor Dezong.
It is not known when Zhang Yi was born, but it is known that his family was from Su Prefecture (蘇州, in modern Suzhou, Jiangsu). His family traced its ancestry to officials of the Spring and Autumn period state Jin, the Warring States period state Han, Han Dynasty, Southern Qi, Liang Dynasty, Sui Dynasty, and Tang Dynasty. His great-great-grandfather Zhang Houyin (張後胤) was a principal of the imperial university early in Tang and carried the title of Duke of Xinye. His grandfather Zhang Lüshi (張律師) served as an advisor to an imperial prince. His grandfather Zhang Yifang (張義方) served as a prefectural prefect. His father Zhang Qiqiu (張齊丘) was a military governor (Jiedushi) of Shuofang Circuit (朔方, headquartered in modern Yinchuan, Ningxia).
Due to Zhang Yi's father Zhang Qiqiu's status, he was made an officer of the imperial guards early in his career. When the major general Guo Ziyi served as the deputy supreme commander of armed forces in the Guannei Region (關內, i.e., the region around the capital Chang'an), because Guo had previously served under Zhang Qiqiu, he invited Zhang Yi to serve as his secretary. He later served as Dali Pingshi (大理評事), a judge at the supreme court, and then as Dianzhong Shiyushi (殿中侍御史), an imperial censor. During Emperor Suzong's Qianyuan era (758-760), there was an incident when a county magistrate, Lu Cong (盧樅), rebuked his subordinate Qi Lingshen (齊令詵), and Qi, as payback, made false accusations against Lu. Zhang was put in charge of the investigation against Lu, and he suggested that Lu be demoted — but after he made his reports to his superiors, they decided that Lu should be executed by caning. Zhang, believing this to be unjust, put on his official uniform and told his mother: