Huan Wen (桓溫) (312 – 18 August 373), courtesy name Yuanzi (元子), formally Duke Xuanwu of Nan Commandery (南郡宣武公), was a general and regent of the Jin Dynasty (266–420), as well as the leader of Huan clan of Qiaoguo (谯国桓氏). He is commonly viewed as one of the greatest generals since Jin's loss of northern China, as he led the campaign that destroyed Cheng-Han and annexed its lands to Jin, and had some successes against the northern states Former Qin and Former Yan (although both campaigns ultimately ended in failure, perhaps due to his overcautiousness).  After his death, the Huan clan would be entrenched in the Jin power struction for decades, after his son Huan Xuan temporarily usurped the Jin throne in 403 as the emperor of Chu (楚), he was posthumously honored as Emperor Xuanwu of Chu with the temple name of Taizu (太祖).
 Huan Wen was born in 312. His father Huan Yi (桓彝) was a commandery governor. When he was young (less than a year old), his father once received a visit from Wen Jiao, who saw the boy and thought that the child was special.  Huan Yi, because Wen had a high opinion of the child, thus named his son Wen, after Wen Jiao's family name.
 In c.August 328, during the rebellion of Su Jun, Huan Yi tried to resist Su's forces, but was defeated and killed by Su's general Han Huang, who received help from Huan Yi's subordinate Jiang Bo (江播). In 329, after Jiang had already died, Huan Wen killed Jiang's sons to avenge his father, and this was an act that brought him great fame.  As he was considered capable, and his father had died for the imperial cause, he was selected as the husband for Emperor Cheng's sister Sima Xingnan (司馬興男) the Princess Nankang.  He inherited his father's title of "Baron of Wanning", and he gradually rose in rank, eventually becoming the governor of Xu Province (徐州, then modern central Jiangsu).  Emperor Cheng's uncle Yu Yi (庾翼) was impressed with his talent, and often endorsed him for even greater responsibilities.  During Emperor Kang's brief reign, Huan was one of the few officials who supported Yu's plan for a northern campaign against Later Zhao in 343, although Yu's plan was never actually carried out.  After Yu's death in 345 (during the reign of Emperor Mu, then a toddler), the chancellor He Chong commissioned Huan to succeed Yu, as the commander of the military forces in the western provinces (roughly modern Hubei, Hunan, Guizhou, and Yunnan), even though some other imperial officials had misgivings about Huan's ambitions and independence.
 Soon after taking over for Yu, the ambitious Huan turned his attention west, wanting to destroy Cheng-Han, whose emperor Li Shi had mismanaged his state and lost the trust of his people.  Most generals had concerns about the geographic barriers that isolated Cheng-Han (which occupied modern Sichuan and Chongqing) from Jin, and that Later Zhao might make a surprise attack if it realized that Jin's forces were attacking Cheng-Han.  Late in 346, he launched the campaign.  Li Shi sent his uncle Li Fu (李福), cousin Li Quan (李權), and Zan Jian (昝堅) to lead his forces to resist Huan, but Huan defeated Li Fu and then, abandoning most of his supplies and traveling light, quickly arrived in the vicinity of Cheng-Han's capital Chengdu.  Zan Jian's forces, in fear, collapsed, instead of being able to regroup to try to save Chengdu.
 However, Li Shi gathered the remaining troops and mounted a counterattack that was initially successful. Huan, in fear, ordered retreat—but his signal officer, in panic, beat his drums (signifying attack) rather than his gong (signifying retreat). The Jin forces attacked harder and defeated Cheng-Han forces, allowing Huan to march upon Chengdu's gates. Li Shi fled, but soon had a messenger submit a humble surrender petition to Huan. He then surrendered in person after binding himself and bringing a coffin—signifying readiness to be executed. Huan released him and escorted him to the Jin capital Jiankang, where Emperor Mu pardoned him and created him a marquess.  To reward Huan, Emperor Mu created him the Duke of Linhe.
 The victory over Cheng-Han, however, brought fear in imperial officials that the ambitious Huan intended to control the government.  Emperor Mu's granduncle Sima Yu, Prince of Kuaiji, in order to counter Huan, invited a renowned official, Yin Hao, to join in major decision-making with him and Cai Mo.  This brought a rivalry that Huan and Yin had since their youth (when both were viewed as up-and-coming talent) into the open.  The rivalry intensified after Yin seized more power late in 350 after accusing Cai of being disrespectful to the emperor (by repeatedly declining an honor that was being bestowed on him) and demoting Cai to commoner status.
 Over the next few years, as Later Zhao collapsed in the midst of internecine wars between the emperor Shi Hu's sons and adoptive grandson Shi Min after Shi Hu's death in 349, Huan repeatedly requested the imperial government to authorize him to advance north to try to recover northern China for Jin, but he was repeatedly rebuffed, even after a campaign by Emperor Mu's maternal grandfather Chu Pou (褚裒) ended badly.  Around the new year 352, Huan, upset that his requests were being repeatedly denied, mobilized his troops and gestured as if he were about to attack the capital. Yin was shocked, and initially considered either resigning or send the imperial banner of peace (Zouyu Fan, 騶虞幡) to order Huan to stop. After advice from Wang Biaozhi (王彪之), however, he instead asked Sima Yu to write a carefully worded letter to Huan, persuading Huan to stop.
 Yin, meanwhile, was preparing his own campaigns, and he launched one campaign in the middle of 352 and one late in 352—the second one being thoroughly disastrous, as he offended and intimidated the general Yao Xiang (姚襄) into rebellion, and was ambushed by Yao at great loss of life and materials.  The people despised Yin for his military losses, and Huan submitted a petition demanding Yin's ouster. The imperial government was compelled to demote Yin to commoner status and exile him.  From that point on, the imperial government largely no longer dared to deny Huan's requests.
 With Yin out of the picture, Huan launched a major attack against one of Later Zhao's successor states, Former Qin, in 354.  His army defeated much of Former Qin's resistance, reaching all the way to the vicinity of Former Qin's capital Chang'an—but Huan hesitated at making one final assault against Chang'an.  It was at this time that Huan met Wang Meng, who came to see him.  Huan was impressed at Wang's knowledge and tactics, and he asked Wang why the people of the Qin lands were not shifting their allegiance to Jin, and Wang pointed out that the people were not sure what Huan's intentions were, given that he hesitated at crossing the Ba River (灞水), just east of Chang'an.  As the situation stalemated, Huan began to run out of food supplies was forced to withdraw.  He invited Wang to withdraw with him, but Wang declined, apparently believing that Huan was not the right person to follow.  (Wang would eventually become the prime minister of the Former Qin emperor Fu Jiān a decade later.)
 In 356, Huan submitted a petition requesting that the capital be moved back to Luoyang—the capital until its fall in 311 to Han-Zhao - but the imperial government declined, instead ordering him to first attack Yao Xiang, who had taken many cities in the Luoyang region after rebelling against Yin Hao earlier.  Huan advanced his troops to Luoyang and faced Yao in battle, and he eluded a trap Yao laid for him and dealt Yao a major defeat, forcing Yao to head west.  (Yao would eventually be captured and killed by Former Qin in 357.)  Huan secured the Luoyang region for Jin.  He, in 362, reproposed the idea of moving the capital back to Luoyang, but the imperial government again declined.
 For the next few years, Huan largely spent his effort in securing his power, as he invited many capable people to join his staff, including Xie An, Wang Tanzhi, Xi Chao, Wang Xun, and Xie Xuan.  He did not carry out another northern campaign, apparently not willing to face the capable Former Yan general Murong Ke in battle.  (Indeed, when Murong Ke's brother, the Former Yan emperor Murong Jun died in 360 and was succeeded by his young son Murong Wei, contrary to the optimism that many Jin officials had that with Murong Jun out of the way that Former Yan would be weakened, Huan commented, "Murong Ke is still alive, and I am afraid that we have an even greater problem.")  In 364, Emperor Ai, who succeeded Emperor Mu in 361, suffered a poisoning after taking pills given to him by magicians in search of immortality, and Huan was initially summoned to the capital to serve as regent, but a second order was then issued him cancelling that summon.  Instead, he set up his base at Zheqi (赭圻, in modern Wuhu, Anhui) and monitored the situation at Jiankang remotely.
 In 365, Murong Ke attacked Luoyang, and initially, Huan and Sima Yu were planning a counterattack to relieve Luoyang, but the plan was cancelled after Emperor Ai died in spring 365.  Soon, Luoyang fell.
 Late in 365, the Jin general Sima Xun, the governor of Liang Province (梁州, modern southern Shaanxi), who had participated in many campaigns, rebelled, and Huan commissioned one of his generals, Zhu Xu, to attack Sima.  Sima was soon captured and killed.
 After Murong Ke died in 367, Huan began to plan to attack Former Yan, whose regime was now largely in the hands of Murong Wei's granduncle Murong Ping the Prince of Shangyong, regarded as incompetent and corrupt, and Murong Wei's mother Empress Dowager Kezuhun.  In 369, he launched the campaign, in conjunction with Xi Chao's father Xi Yin (郗愔), his brother Huan Chong, and Yuan Zhen, although he soon seized Xi Yin's troops and put them under his own command.  Despite Xi Chao's advice that he head directly for Former Yan's capital Yecheng, Huan proceeded slowly, defeating Former Yan's troops repeatedly but taking three months to reach the Yellow River, stoppinging Fangtou (枋頭, in modern Hebi, Henan) -- and again hesitated there at crossing the Yellow River and attacking Yecheng, not far away.
 Murong Wei and Empress Dowager Kezuhun were panicking and planning to flee back to the old capital Helong (和龍, in modern Jinzhou, Liaoning), but Murong Wei's uncle Murong Chui the Prince of Wu offered to make one last attempt to resist Huan.  Murong Chui and his brother Murong De engaged Huan, dealing him minor losses.  Meanwhile, the Jin army's food supply was running out (as a supply plan that Huan put Yuan in charge of was failing in light of the failure to build a canal quickly).  Huan began to withdraw, and Murong Chui and Murong De set up a trap for Huan's army, nearly annihilating it.  Soon, Former Qin forces, from which Former Yan had sought assistance from, also arrived, and Huan was dealt another major defeat.  Huan, humiliated at the greatest defeat in his career, deflected blame by accusing Yuan of being unable to supply food and ordered that Yuan be demoted to commoner status.  Yuan, instead of submitting, occupied Shouchun (壽春, in modern Lu'an, Anhui) and rebelled, seeking assistance from both Former Yan and Former Qin.
 With Huan's forces having been severely defeated, Yuan was able to hold Shouchun.  He died in spring 370, and was succeeded by his son Yuan Qin.  Huan's forces, under his generals Zhu Yao (竺瑤) and Huan Shiqian were able to defeat Former Yan and Former Qin forces sent in aid of Yuan Qin.  In fall 370, Huan himself arrived at Shouchun and surrounded it.  At that time, Former Yan was under a major attack by Former Qin's prime minister Wang Meng, and Former Yan forces withdrew.  After Former Yan fell to Former Qin later that year, Shouchun was in even greater distress.  Former Qin relief forces, sent in spring 371, were defeated by Huan.  Huan then captured Shouchun and slaughtered Yuan's clan, along with the clan of his supporter Zhu Fu (朱輔).
 Huan had long considered seizing the Jin throne, and his original plan had been that if he had been able to destroy Former Yan, he would then return to Jiankang and force the imperial government to confer the nine bestowments on him, and then he could take the throne.  Once, he had asked the fortuneteller Du Jiong (杜炅), who had a reputation for accurate prophecies, to see what he could achieve.  Du's response was, "Your achievements are as great as the universe, and you will reach the highest rank among imperial subjects."  This made Huan rather unhappy, as he hoped to be more than an imperial subject.
 After recovering Shouchun, he asked Xi Chao whether the humiliation at the Battle of Fangtou had been removed—and Xi honestly told him that it had not.  Instead, they planned an alternate strategy to try to showcase Huan's power—deposing Emperor Fei.  Because Emperor Fei had been cautious in his behavior and lacked faults, they decided to spread rumors that Emperor Fei was impotent and unable to bear children—and that his sons, by his concubines Consort Tian and Consort Meng, had in fact been biological sons of men whom he favored, Xiang Long (相龍), Ji Hao (計好), and Zhu Lingbao (朱靈寶).  (The rumors also implied a homosexual relationship between Emperor Fei and Xiang, Ji, and Zhu.)  He then went to the capital and intimidated Emperor Kang's wife, Empress Dowager Chu, to issue an edict that he had drafted deposing Emperor Fei.  Emperor Fei was reduced to the rank of Prince of Donghai, and then further to Duke of Haixi, and put under heavy guard.  Huan made his granduncle, Sima Yu, Prince of Kuaiji, emperor (as Jianwen), apparently believing that the easy-going Sima Yu would be easy to control.  Meanwhile, he carried out several acts intended to both terrorize imperial officials and to affirm his power—he deposed Emperor Jianwen's brother Sima Xi (司馬唏) the Prince of Wuling, and killed many members of the honored Yin and Yu clans under false accusations of treason.  (He wanted to kill Sima Xi as well, but Emperor Jianwen wrote humble letters to him begging for Sima Xi's life, and Huan was unable to insist on Sima Xi's death.)
 In 372, Emperor Jianwen grew ill, and he issued four successive edits summoning Huan to the capital—a strong indicator that he was willing to yield the throne to Huan—but Huan declined each time, apparently believing that the edicts were a trap.  Indeed, Emperor Jianwen initially drafted a will that stated, "The Grand Marshal Huan Wen shall be regent under the precedent of the Duke of Zhou," and "If the child can be assisted, assist him; otherwise, take the throne yourself," mirroring language that Liu Bei, the founding emperor of Shu Han, used when entrusting his son Liu Shan to Zhuge Liang.  With Huan not in the capital to affirm it, however, Wang Tanzhi persuaded Emperor Jianwen to tear up the will and rewrite the instructions as, "All major affairs shall be submitted to the Grand Marshal, under the precedents of Zhuge Liang and Wang Dao," greatly reducing any legitimacy Huan might have if he should try to take the throne.
 Emperor Jianwen soon died, and was succeeded by his son Sima Yao the Crown Prince (as Emperor Xiaowu).  With Huan not in the capital, actual power at the capital soon slipped into the hands of Xie An and Wang Tanzhi, a situation that greatly displeased Huan, who, however, when again summoned by Emperor Xiaowu and Empress Dowager Chu to serve as regent, declined.  He did visit the capital in 373, and there was a rumor that he would execute Wang and Xie and then seize the throne.  As Wang and Xie greeted him, however, he did not carry out the rumored actions, and after visiting the young emperor, returned to his base at Gushu (姑孰, in modern  Ma'anshan, Anhui).  He grew ill in fall 373, and, after entrusting matters to his brother Huan Chong, died.  His domain was divided into three parts, governed by Huan Chong, another brother Huan Huo, and his nephew Huan Shixiu (桓石秀).  As Huan Chong was loyal to the imperial government, the threats of a Huan usurpation dissipated.  (When, on his deathbed, Huan Wen was asked by Huan Chong what to do with Wang and Xie, his response was, "They will not let you handle them," meaning that while Wang and Xie were not daring to disobey him while alive, they would not obey Huan Chong after his death, and that killing them would not be helpful to Huan Chong either.)  Despite imperial officials' secret happiness that Huan was dead, he was formally buried with great honors.
 Consorts and issues: