Emperor Wen of Western Wei

Emperor Wen of Western Wei ((西)魏文帝) (507 – 28 March 551 ), personal name Yuan Baoju (元寶炬), was the first emperor of the Western Wei dynasty of China. In 534, Yuan Baoju, then the Prince of Nanyang, followed his cousin Emperor Xiaowu of Northern Wei in fleeing from the capital Luoyang to Chang'an, after a fallout between Emperor Xiaowu and the paramount general Gao Huan. However, Emperor Xiaowu's relationship to the general that he then depended on, Yuwen Tai, soon deteriorated as well, and around the new year 535, Yuwen Tai poisoned Emperor Xiaowu to death, making Yuan Baoju emperor. As Gao Huan had, late in 534, made Yuan Shanjian (Emperor Xiaojing of Eastern Wei)—the son of Emperor Wen's cousin Yuan Dan (元亶)—emperor, thus establishing the Eastern Wei, Emperor Wen is therefore regarded as Western Wei's founding emperor, formalizing the division of the Northern Wei dynasty. Emperor Wen's relationship with Yuwen Tai appeared cordial, but he was unable to exercise much real power.

Background
Yuan Baoju was born in 507, a member of the Tuoba clan of the Xianbei. His father Yuan Yu (元愉), the Prince of Jingzhao, was the son of Emperor Xiaowen and a younger brother of the reigning Emperor Xuanwu. His mother was recorded as Yuan Yu's concubine Yang Aofei (杨奥妃). He had three other brothers, at least one of whom, Yuan Baoyue (元寶月), was older, and born of Yang Aofei.

Yuan Yu favored Yang Aofei but not his wife, Princess Yu, a sister to Emperor Xuanwu's wife Empress Yu. Consequently, Empress Yu once summoned Yang Aofei to the palace, beat her severely, and then forced her to become a Buddhist nun. Only after the intercession of Empress Yu's father Yu Jing (于勁) was Yang Aofei returned to Yuan Yu. Meanwhile, in 508, Yuan Yu himself was punished by Emperor Xuanwu for corruption. He was caned 50 times and demoted to the governorship of Ji Province (冀州, modern central Hebei). In anger, he rebelled at the capital of Ji Province, Xindu (信都, in modern Hengshui, Hebei), alleging falsely that Emperor Xuanwu's uncle Gao Zhao had murdered the emperor and declaring himself emperor. Yuan Yu's rebellion was soon defeated by the general Li Ping (李平), and during his being delivered to the capital Luoyang, Gao had him killed. At that time, Yang Aofei was pregnant, and she was permitted to give birth and then was executed. Emperor Xuanwu did not execute any of Yuan Yu's sons, but had them, including Yuan Baoju, put under arrest at Zongzheng Temple (宗正寺). Assuming that Yang Aofei and Lady Yang were in fact the same person, this also meant that Yuan Baoju grew up without either parent. He and his brothers remained at Zongzheng Temple and were released only after Emperor Xuanwu's death in 515. During the reign of Emperor Xuanwu's son Emperor Xiaoming, Emperor Xiaoming's mother Empress Dowager Hu posthumously recreated Yuan Yu the Prince of Lintao, and Yuan Baoju and his brothers then observed a mourning period for their parents. Yuan Baoyue inherited the title, but Yuan Baoju did not possess any titles at the moment, although he was made a general. Despite Empress Dowager Hu's rehabilitation of Yuan Yu, however, Yuan Baoju was not impressed at her toleration of corruption, particularly by her lovers, and he secretly plotted with Emperor Xiaoming to have her lovers killed. When this plot was discovered, he was stripped of the office he held. In 525, he married his wife Lady Yifu, the daughter of a moderately prominent aristocratic family. (In his youth, Yuan Baoju was described by the Book of Wei as frivolous, alcoholic, and sexually immoral, but this description is highly suspect in that the Book of Wei was written by Wei Shou, an official of Eastern Wei, the rival of Western Wei, for which Yuan Baoju would eventually become emperor.) In 528, Emperor Xiaoming created him the Marquess of Shao County, and in 530, Emperor Xiaozhuang created him the Prince of Nanyang.

In 532, after several years of civil war, the victorious general Gao Huan made Yuan Baoju's cousin Yuan Xiu the Prince of Pingyang emperor (as Emperor Xiaowu). Emperor Xiaowu was not happy about Gao's hold on the military, and he entered into alliances with the independent generals Yuwen Tai and Heba Sheng (賀拔勝), seeking to resist Gao's control. Yuan Baoju served in Emperor Xiaowu's administration as a general. In 534, Emperor Xiaowu planned to act against Gao, but Gao discovered his plan and instead marched on Luoyang. Emperor Xiaowu decided to flee to Yuwen's territory, and Yuan Baoju accompanied Emperor Xiaowu in doing so, arriving at Chang'an in late 534. Also accompanying Emperor Xiaowu was Yuan Baoju's sister Yuan Mingyue (元明月) -- who was in an incestuous relationship with Emperor Xiaowu. Yuwen did not tolerate Emperor Xiaowu's incestuous relationships with Yuan Mingyue and two other cousins, and eventually he had Yuan Mingyue killed. Emperor Xiaowu became angry, and his relationship with Yuwen deteriorated. Around the new year 535, Yuwen poisoned him to death.

Initially, Yuwen was poised to make Emperor Xiaowu's nephew Yuan Zan (元贊) the Prince of Guangping the new emperor. However, under suggestion of Yuan Shun (元順) the Prince of Puyang, who argued that Yuan Zan was too young, Yuwen changed his mind and made Yuan Baoju, then 27, emperor instead (as Emperor Wen). As Gao had earlier declared Yuan Shanjian, the son of Yuan Baoju's cousin Yuan Dan (元亶) the Prince of Qinghe, emperor, Gao's territory became known as Eastern Wei, with Yuan Shanjian (Emperor Xiaojing) as emperor, and Yuwen's territory became known as Western Wei, with Emperor Wen as emperor.

Reign
Yuwen Tai publicly deferred to Emperor Wen on most matters, but Yuwen held actual power, with Emperor Wen not being able to exercise much independent authority. Throughout the early years of his reign, there were serious doubts as to whether Western Wei would survive, as Eastern Wei was then the much stronger state, and Gao Huan made repeated attempts to conquer Western Wei. However, with Yuwen and other generals capably defending the territory, Western Wei was able to withstand Gao's assaults.

In 535, Emperor Wen posthumously honored his father Yuan Yu as Emperor Wenjing, and he posthumously honored his mother Lady Yang as empress. He created his wife Princess Yifu empress, and her son Yuan Qin crown prince. His marriage with Empress Yifu was said to be a happy one, as she was virtuous and beautiful, and Emperor Wen respected her greatly. They had 12 children, although only Yuan Qin and Yuan Wu (元戊) the Prince of Wudu survived infancy.

In 538, with Western Wei under the threat of attack by Rouran, Yuwen first tried to alleviate the situation by marrying a daughter of a member of the imperial clan to Yujiulü Tahan (郁久閭塔寒), the brother of Rouran's Chiliantoubingdoufa Khan Yujiulü Anagui, but then, believing that to be insufficient, he asked Emperor Wen to divorce Empress Yifu and marry Yujiulü Anagui's daughter. Emperor Wen agreed, and divorced Empress Yifu, making her a Buddhist nun. He then married Yujiulü Anagui's daughter and created her empress. For a while, this brought peace with Rouran.

Later in 538, with Western Wei then (temporarily) controlling the old Northern Wei capital Luoyang, but with Luoyang under attack, Emperor Wen (who had wanted to visit the imperial ancestral tombs in Luoyang) and Yuwen led troops to reinforce Luoyang's defenses, leaving the official Zhou Huida (周惠達) and Crown Prince Qin in Chang'an. However, with the forces engaged in battle, Emperor Wen eventually became stuck at Hengnong (恆農, in modern Sanmenxia, Henan), when Chang'an was taken by rebelling former Eastern Wei troops who had been taken captive previously by Western Wei, forcing Zhou and Crown Prince Qin to flee as well. Yuwen was eventually able to disengage after abandoning Luoyang, and he put down the rebellion, allowing Emperor Wen to return to Chang'an.

Although the former Empress Yifu had been deposed and made a Buddhist nun, Empress Yujiulü was still not happy about her presence in the capital. In 540, Emperor Wen therefore made Yuan Wu the governor of Qin Province (秦州, roughly modern Tianshui, Gansu), and had Empress Yifu accompany Yuan Wu to Qin Province. However, because he still hoped to welcome her back to the palace one day, he secretly told her to keep her hair uncut, rather than shaved like a Buddhist nun. At this time (spring of 540), however, Rouran made a major attack on Western Wei, and many officials thought that the attack was on behalf of Empress Yujiulü. Emperor Wen felt compelled to order Empress Yifu to commit suicide, and he did; Empress Yifu was 31 (by East Asian reckoning) when she died. Soon thereafter, Empress Yujiulü, who was pregnant, died during childbirth.

In 548, Yuwen and Yuan Qin were on a grand tour of the provinces when Emperor Wen grew ill, and when they heard the news, Yuwen returned to Chang'an quickly, although by the time they returned, Emperor Wen had recovered.

In 549, Emperor Wen issued an edict—probably as Yuwen requested—ordering that the names of the ethnic Xianbei, changed to Han names during the reign of Emperor Xiaowen, be changed back to the original Xianbei names.

In 550, Gao Huan's son Gao Yang forced Eastern Wei's Emperor Xiaojing to yield the throne to him, ending Eastern Wei and starting Northern Qi (as its Emperor Wenxuan). Emperor Wen therefore became the only claimant to the Northern Wei throne. Yuwen, declaring Northern Qi a rebel state, launched a major attack, but Gao Yang himself commanded a large army to defend against the attack, and Western Wei not only did not make gains, but lost a number of provinces to Northern Qi.

In March 551, Emperor Wen died and was buried with honors due an emperor, with Empress Yujiulü, although eventually Empress Yifu was buried with him. (It is not clear whether she displaced Empress Yujiulü or not.) Yuan Qin succeeded him (as Emperor Fei of Western Wei). Some scholars speculated that Emperor Wen was poisoned to death by Hu Zhi, an associate of Yuwen Tai who was put in charge of imperial diet.

Family
Parents Consort and issue(s):
 * Father: Yuan Yu, Emperor Wenjing (文景皇帝 元愉; 488 – 508), son of Emperor Xiaowen of Northern Wei
 * Mother: Empress Wenjing, of the Yang clan (文景皇帝 杨氏, 481 – 9 December 509), personal name Aofei (奥妃)
 * Empress Wen, of the Yifu clan (文皇后 乙弗氏, 510 – spring 540, married 525)
 * Yuan Qin, Emperor Fei (廢帝元欽, 525? – 554), first son
 * Yuan Wu, Prince of Wudu (武都王元戊), third son
 * Unnamed ten children
 * Empress Dao, of the Yujiulü clan (悼皇后 郁久閭氏, 525 – 540)
 * Unnamed child (540)
 * Unknown
 * Yuan Jin, Prince of Jin (晋王元謹, d. 547), second son
 * Yuan Kuo, Emperor Gong (恭帝 元廓 537? – 557), fourth son
 * Yuan Jian, Prince of Liang (梁王 元儉), fifth son
 * Yuan Ning, Prince of Zhao (趙王 元寧, executed 557 by Yuwen Hu), later Duke of Wei Commandery, sixth son
 * Seventh son
 * Eight son
 * Yuan Ru, Prince of Yan (燕王元儒, executed 557 by Yuwen Hu), later Duke of Yan Commandery, ninth son
 * Princess Jinming (金明公主), first daughter
 * married Yuchi Jiong (尉遲迥) and had issue (one daughter)
 * Princess Guangning (广宁公主, 543 – 590), third daughter
 * married Yu Yi (于仪), a son of Yu Jin (于谨)
 * Princess Jin'an (晋安公主, d. 616), personal name Humo (胡摩), fifth daughter
 * married Emperor Xiaomin of Northern Zhou
 * Princess Yiyang (义阳公主)
 * married Dou Zhao (窦照), a son of Dou Yi (窦毅), and had issue (one son)
 * Princess Xiangle (襄樂公主)
 * married Wei Shikang (韦世康) a son of Wei Xiong (韦夐), and had issue ( three sons)
 * Lady Yuan (元氏)
 * married Yuwen Zhen, Duke Songxian (宋獻公 宇文震), a son of Yuwen Tai
 * Lady Yuan (元氏)
 * married Xin Wei (辛威), Duke of Su (宿国公)