Huan Yi (died 391), courtesy name Shuxia was a Chinese military general and musician of the Jin dynasty (266–420). He was a very popular administrator among the people of Yuzhou, from his early days of Prefect of Huainan to Inspector of the province. He participated in the famous Battle of Fei River in 383, fighting alongside Xie Xuan as they repel Former Qin forces. Outside his military career, Huan Yi was most known for was his contribution in music. It is believed that he was the original composer of the popular guqin composition "Mei Hua Sannong (梅花三弄)" or "3 Variations on the Plum Blossom".

Administrative and military career 
Huan Yi was from Zhi County (銍縣, in present-day Anhui province) and was a kinsman to the general Huan Xuan (not to be confused with the Huan Chu emperor, Huan Xuan). He was appreciated by the likes of Wang Meng and Liu Tan and handled various military affairs before serving Jin's Grand Marshal Huan Wen. As it became apparent that one of Jin's northern rivals, Former Qin, was growing powerful by the day, Huan Yi was chosen to become Prefect of Huainan to protect Jin's borders. Huan Yi managed his responsibilities well, so the court extended his control to parts of Yuzhou and Yangzhou and made him General Who Establishes Might.   

Huan Yi followed Huan Wen in quelling Yuan Zhen's Rebellion in 370. He and Huan Shiqian were tasked in preventing Qin reinforcements from reaching Shouchun. The two of them routed Zhang Ci and Wang Jian (王堅) at Shiqiao (石橋, around present-day Lu'an, Anhui), allowing Huan Wen to quell the rebellion in 371. In 374, Huan Yi was made Chief Controller of Yuzhou and also Inspector of Yuzhou. Huan Yi administered the province for ten years, being well-respected by its populace for his fair and competent treatment of them.

In 383, the Heavenly King of Qin, Fu Jian launched a major campaign to conquer Jin and unify China under his rule. Huan Yi worked alongside Xie Xuan to drive back the numerically superior Qin forces. At the Battle of Fei River, through the help of Xie Xuan and Xie An's deception, the Qin army was tricked into making a disorganized retreat. Huan Yi and Xie Xuan charged at the retreating Qin forces, leaving thousands of them dead in their wake. The battle sealed the fate of Qin, as many of Fu Jian's generals would betray him and established their own state.

After their massive victory, Huan Yi dedicated himself to collecting armours from the site of the battle, amassing a total of 600 by the end of his life. He also made a list of people to present themselves in court and be gifted with the armours he collected. Huan Yi believed that this would help in Jin's unification process in case he dies before he lived to see the day. 

In 384, Huan Wen's brother, Huan Chong died. The court decided to have Huan Yi succeed his position of Inspector of Jiangzhou. Upon inspection of the towns in Jiangzhou, Huan Yi noticed that it required reforms, especially with Qin no longer posing a threat. He informed the court that Jiangzhou was suffering from a famine and proposed that the small counties be merged, rice debts be exempted and that Jiangzhou's prefectural government office be moved to Yuzhang (豫章, in present-day Nanchang, Jiangxi). For solving this issue, the people of Jiangzhou greatly respected Huan Yi.

Later in his life, Huan Yi became General Who Protects the Army and received 2,000 men from the General of the Right to serve among his staff. Huan Yi died in 391 while in office. He was posthumously appointed as General of the Right and given the posthumous title of 'Lie (烈)'. His tomb is located on Shima Street (石馬街), Caijiafang (蔡家坊) in Nanchang.

Music 
The Book of Jin notes on Huan Yi's talent in music with the flute being his forte. Huan Yi's  bamboo flute was said to be the "Ke Ting Di (柯亭笛)", a famous flute made by the Han dynasty intellectual Cai Yong. He was also said to be the composer of "Mei Hua Sannong". As the story goes, the calligrapher Wang Huizhi was travelling to the capital when he met Huan Yi along the way. Wang asked him to play his flute, so Huan Yi performed the song with his flute before leaving without a word. The original score for the flute does not exist today but was supposedly adapted for the guqin by Yan Shigu during the Tang dynasty. 

Another anecdote that highlights his musical talents was said to have taken place in 383. Xie An hated his son-in-law Wang Guobao who was greedy and abused his power, so he had his daughter divorce him. However, Wang was a friend of Emperor Xiaowu, so Xie An's actions made him disliked by the emperor, much to Xie An's disappointment. At a banquet, Huan Yi was sitting next to Xie An when the emperor called him up to perform his flute. Huan Yi first asked the emperor to have his jester perform the flute for him. However, the jester could not play, so Huan Yi asked for the court singer instead. She could not play either so Huan Yi asked the emperor to call for the jester's servant, who was skilled at the flute. Once he had all three of them, Huan Yi performed the "Poem of Complaint (怨詩)", a poem created by Cao Zhi during the Three Kingdoms period. The poem was Cao Zhi's way of expressing his frustrations towards the emperor, his brother Cao Pi. It focuses on the hardships of a minister, making allusions to King Wu of Zhou and his brother, the Duke of Zhou. Xie An realized that he was the subject of Huan Yi's chosen poem and began to cry. After the performance, Xie An stood and praised Huan Yi while the emperor watched in shame.

References 

 Fang, Xuanling (ed.) (648). Book of Jin (Jin Shu).
 Liu, Yiqing (ed.) ( 5th century). A New Account of the Tales of the World (Shishuo Xinyu / Shiyu).
 Sima, Guang (1084). Zizhi Tongjian.

391 deaths
Jin dynasty (266–420) generals
Jin dynasty (266–420) musicians
4th-century Chinese musicians