Emperor Wen of Sui

Emperor Wen of Sui (隋文帝; 21 July 541 – 13 August 604), personal name Yang Jian (楊堅), was the founder and first emperor of China's Sui Dynasty (581–618 AD). He was a hard-working administrator and a micromanager. As a Buddhist, he encouraged the spread of Buddhism through the state. He is regarded as one of the most important emperors in Chinese history, reunifying China in 589 after centuries of division since the fall of Western Jin Dynasty in 316. During his reign began the construction of the Grand Canal.

As a Northern Zhou official, Yang Jian served with apparent distinction during the reigns of Emperor Wu of Northern Zhou and Emperor Xuan of Northern Zhou. When the erratic Emperor Xuan died in 580, Yang, as his father-in-law, seized power as regent. After defeating the general Yuchi Jiong, who resisted him, he seized the throne for himself, establishing the new Sui Dynasty (as its Emperor Wen). He was the first Chinese to rule North China after the Xianbei invasion which conquered that area from the Liu Song dynasty (not counting the brief reconquest of that region by Emperor Wu of Liang).

Generally speaking, Emperor Wen's reign was a great period of prosperity not seen since the Han Dynasty. Economically, the dynasty prospered. It was said that there was enough food stored for 50 years. The military was also powerful. At the beginning of his reign, Sui faced the threat of Tujue to the north, and neighbored Tibetan tribes to the west, Goguryeo in the northeast, and the kingdom known as Champa threatening the south. By the end of Emperor Wen's reign, Tujue had split into an eastern and a western kaganate, the eastern one being nominally submissive to Sui, as was Goguryeo. Linyi was defeated and, while not conquered, did not remain a threat.

Emperor Wen is also famous for having the fewest number of concubines for an adult Chinese emperor. (The Ming Dynasty Hongzhi Emperor was the only perpetually monogamous Chinese emperor.) Emperor Wen was known for having only two concubines (although he might have had additional concubines not documented by traditional historians), with whom he might not have had sexual relations until after the death in 602 of his wife Empress Dugu Qieluo, whom he loved and respected deeply.

Early life
Yang Jian's clan was descended from Xue Shan (薛善), the mayor of the capital Chang'an. Yang Jian was raised by a Buddhist nun until he was 12 years old. He attended the imperial college for the sons of the nobility and high officials. When he was 14 years old, he was appointed to serve in the military under Yüwen Tai.

In 555, on account of Yang Zhong's accomplishments, Yang Jian received several official ranks, including the title of the Duke of Chengji (成紀縣公). In 557, Dugu Xin, impressed with Yang Jian, gave his daughter, Empress Dugu Qieluo, to Yang and made her his wife. He was 16, and she was 13. After Yuwen Tai's son Emperor Ming of Northern Zhou came to the throne later that year, Yang Jian was made the vice minister of internal affairs, and he was created the greater title of Duke of Daxing (大興郡公). Subsequently, during the reign of Emperor Ming's brother Emperor Wu, Yang Jian was further promoted in military authority. After Yang Zhong's death in 568, he inherited the title of Duke of Sui. In 573, Emperor Wu took Yang Jian's daughter Yang Lihua to be the wife and crown princess of his son Yuwen Yun the Crown Prince, and further honored Yang Jian. It was said that, however, that Yang Jian was so unusual in his appearance that some of Emperor Wu's close associates suspected Yang Jian of eventually harboring treasonous intent. Both Emperor Wu's brother Yuwen Xian the Prince of Qi and the general Wang Gui (王軌) were said to have suggested that Emperor Wu execute Yang Jian, but Emperor Wu resisted. Still, Yang Jian heard rumors and tried to hide his own talent to avoid trouble. It was not until 575 when Emperor Wu involved Yang Jian in a major campaign against rival Northern Qi. Yang Jian also participated in the 576–577 campaign that saw Emperor Wu being able to destroy Northern Qi and seize its territory.

In 578, Emperor Wu died, and Yuwen Yun took the throne as Emperor Xuan. Emperor Xuan immediately began to show erratic behavior, and while he created Yang Jian's daughter Crown Princess Yang empress, he suspected Yang Jian deeply, although he made Yang Jian the minister of defense. In 579, Emperor Xuan passed the throne to his young son Yuwen Chan (by his concubine Consort Zhu Manyue) (as Emperor Jing) and became retired emperor (with the atypical title of "Emperor Tianyuan" (Tianyuan Huangdi), but continued to exercise imperial powers. On one occasion, he became so suspicious of Yang Jian that he stated to Empress Yang, "I will surely slaughter your clan!"  He then summoned Yang Jian to the palace, with instructions to kill him if his expressions betrayed any worries, but Yang Jian arrived without showing any unusual emotions, and so avoided being killed.  On another occasion, Empress Yang displeased Emperor Xuan, and Emperor Xuan ordered her to commit suicide.  When Duchess Dugu heard this, she went to the palace to beg Emperor Xuan's forgiveness, and Emperor Xuan eventually spared Empress Yang.

Regency
In summer 580, with Emperor Xuan intending to conquer Chen Dynasty, he sent Yang Jian to be the commandant at Yang Province (揚州, roughly modern Lu'an, Anhui) to prepare for the campaign against Chen. Before Yang Jian could depart, however, Emperor Xuan suddenly grew seriously ill. Two of Emperor Xuan's close associates, Liu Fang (劉昉) and Zheng Yi (鄭譯), who were friends of Yang's, summoned Yang to the palace to prepare to serve as regent, overriding the desire of another closet associate, Yan Zhiyi (顏之儀), to have Emperor Xuan's uncle Yuwen Zhao (宇文招) the Prince of Zhao appointed regent. Emperor Xuan soon died, and Zheng and Liu issued an edict in Emperor Xuan's name appointing Yang regent.

Yang immediately pleased the officials at the capital by abolishing the wastefulness and cruel policies of Emperor Xuan, and he himself demonstrated both hard work and frugality, which impressed the people. Fearful of the intentions of the general Yuchi Jiong, who was then the commandant at Xiang Province (相州, roughly modern Handan, Hebei), he summoned Yuchi back to the capital. Yuchi, however, refused, and believing that Yang's intentions were to usurp the throne, rose at Xiang Province against Yang. He was supported by the generals Sima Xiaonan (司馬消難), the commandant at Xun Province (勛州, roughly modern Xiaogan, Hubei) and Wang Qian (王謙), the commandant at Yi Province (益州, roughly modern Chengdu, Sichuan). However, just 68 days after Yuchi rose in rebellion, the general Wei Xiaokuan defeated Yuchi, and Yuchi committed suicide. Wang was also soon defeated, and Sima fled to Chen. To prevent Yuchi's headquarters at Yecheng to be used again as a base of opposition against him, Yang Jian had Yecheng (Northern Qi's old capital) torn down.

During Yuchi's campaign, Yuwen Zhao made an attempt to assassinate Yang, but failed. In response, Yang put Yuwen Zhao and his brother Yuwen Sheng (宇文盛) the Prince of Yue to death, and after Yuchi was defeated, he began to slaughter the Yuwen clan in earnest. He also had Emperor Jing promote his titles quickly, and he changed his surname back to Yang. Around the new year 581, his title was promoted to Prince of Sui 隨王). In spring 581, he had Emperor Jing yield the throne to him, ending Northern Zhou and establishing Sui Dynasty, as its Emperor Wen.  (His use of "Sui" as his new dynasty name was typical of Chinese historical dynastic transitions—using the old fief name as the new dynasty's name—but he, believing that the character for his fief Sui (隨) to contain a "辶" radical, denoting "walking" and therefore a lack of permanence in the regime, removed "辶" from the character, rendering it "隋".)

Early Kaihuang era
Emperor Wen abolished Northern Zhou's governmental organization of six departments, instead establishing five main bureaus—executive bureau (Shangshu Sheng (尚書省)), examination bureau (Menxia Sheng (門下省)), legislative bureau (Neishǐ Sheng (內史省)), archival bureau (Mishu Sheng (秘書省)), and eunuch bureau (Neishì Sheng (內侍省—note different tone and character versus 'legislative bureau')), with two additional independent agencies, 11 other independent departments, and 12 military commands. He posthumously honored his father Yang Zhong and mother Lady Lu as emperor and empress. He created his wife Duchess Dugu empress and their oldest son Yang Yong crown prince; he created his brothers and his other sons imperial princes. He initially created Northern Zhou's Emperor Jing the Duke of Jie, but soon slaughtered all grandsons of Yuwen Tai, and eventually put the Duke of Jie to death as well. He entrusted most of the important governmental matters to his officials Gao Jiong, Yang Su, and Su Wei. Agreeing with some officials' assertions that Northern Zhou fell because its imperial princes lacked power to protect the central government, he sent his sons out to key provinces with broad powers. He further commissioned the official Pei Zheng (裴政) to carry out a project of simplifying the penal code and decrease the penalty from the harsh laws—a reform that was later largely accepted by the succeeding dynasties.

Emperor Wen did not maintain as submissive a relationship with Tujue, which brought resentment from Tujue's Shabolüe Khan Ashina Shetu, and Ashina Shetu's wife, Northern Zhou's Princess Qianjin (Yuwen Zhao's daughter) particularly hated Emperor Wen for destroying Northern Zhou. Ashina Shetu therefore carried out a series of border attacks against Sui, allied with Gao Baoning (高寶寧), the former Northern Qi general who was still holding Ying Province (營州, roughly modern Zhaoyang, Liaoning). In response, Emperor Wen, under advice from the general Zhangsun Sheng (長孫晟), Emperor Wen carried out the strategy of placating Ashina Shetu's subordinate khans—his uncle Datou Khan Ashina Dianjue (阿史那玷厥), cousin Abo Khan Ashina Daxianbian (阿史那大暹便), and brother Ashina Chuluohou (阿史那處羅侯) – to create dissension within Tujue, and gradually, the strategy worked, causing Tujue to be unable to take unified actions against Sui.

In 581, Emperor Wen commissioned a major attack on Chen, and while it was initially successful, Emperor Wen withdrew the attack in spring 582 after hearing that Emperor Xuan of Chen had died and believing it wrongful to attack a state whose emperor had just died.

In 582, believing that Chang'an was too small of a city, Emperor Wen built a new capital nearby, which he named Daxing, and in spring 583 he moved the capital to Daxing. (From that point forward, Daxing and Chang'an became interchangeable names, although by the time of succeeding Tang Dynasty, the new capital was known again just as Chang'an.)

Also in 582, Emperor Wen, thankful for the refusal by the vassal Emperor Ming of Western Liang to support Yuchi Jiong in 580, withdrew his forces from Western Liang's capital Jiangling, permitting Western Liang a degree of self-governance. He also took Emperor Ming's daughter as the wife and princess to his son, Yang Guang the Prince of Jin. (After Emperor Ming's death in 585 and succession by his son Emperor Jing of Western Liang, however, Emperor Wen reestablished the post of commandant of Jiangling and again put Western Liang territory under military control.)

By spring 583, Tujue's internal dissension had become serious enough that Emperor Wen felt comfortable enough to commission his brother Yang Shuang (楊爽) the Prince of Wei to command a major attack against Ashina Shetu. Yang Shuang achieved a great victory, and part of his army, commanded by the general Yin Shou (陰壽), defeated Gao, forcing Gao to try to flee to the Qidan, but on the way, Gao was killed by his own subordinates, ending the very last bit of Northern Qi resistance. After the defeat, the various subordinate khans further engaged in battles among themselves and against Ashina Shetu, with Sui watching by, refusing to give aid to any side. By 584, Ashina Shetu submitted to Sui, and even the resentful Princess Qianjin referred to Emperor Wen as "father." He created her the Princess Dayi.

In summer 584, believing that the Wei River, on account of its sandbars and treacherous waters, was becoming too difficult of a route for food transport to Daxing, commissioned the official Yuwen Kai (宇文愷) to construct a canal between Daxing and Tong Pass, parallel to the Wei River, named the Guangtong Canal (廣通渠), greatly easing the transport of food and other supplies to the capital region Guanzhong. Nevertheless, on account of a famine in Guanzhong in fall 584, Emperor Wen briefly took up residence in Luoyang.

In 586, the officials Liang Shiyan (梁士彥) the Duke of Cheng, Yuwen Xin (宇文忻) the Duke of Qi, and Liu Fang the Duke of Shu—all three of whom were friends of Emperor Wen but all of whom believed that they had been slighted by Emperor Wen—were accused of plotting rebellion, and all three were executed.

In spring 587, continuing his canal-building regime, Emperor Wen built the Shanyang Canal (山陽瀆) between the Yangtze River and the Huai River to improve the transport of material between those two rivers.

In fall 587, Emperor Wen summoned Western Liang's Emperor Jing to Chang'an to meet him. Emperor Jing complied with the direction. While Emperor Jing was away, however, Emperor Wen, believing that Jiangling would not be guarded well, sent his general Cui Hongdu (崔弘度) to Jiangling. Emperor Jing's uncle Xiao Yan (蕭巖) the Prince of Anping and Xiao Huan (蕭瓛) the Prince of Yixing instead believed that Cui was intending to attack the city, and they took the populace of the city and surrendered to the Chen general Chen Huiji (陳慧紀), the cousin to Chen's emperor Chen Shubao. In response, Emperor Wen abolished Western Liang, directly seizing its territory, while creating Emperor Jing the Duke of Ju. Emperor Wen, who had been planning to conquer Chen for years, now further enhanced his planning in earnest. In spring 588, Emperor Wen publicly announced a campaign against Chen, commanded by Yang Guang, another of his sons Yang Jun the Prince of Qin, and Yang Su, with Yang Guang in overall command. Gao Jiong served as Yang Guang's assistant.

In spring 589, the Sui general Heruo Bi (賀若弼) crossed the Yangtze at Jingkou (京口, in modern Zhenjiang, Jiangsu), and the Sui general Han Qinhu (韓擒虎) crossed the Yangtze at Caishi (采石, in modern Ma'anshan, Anhui). Meanwhile, Yang Su was advancing from the west down the Yangtze, and Yang Jun was stationed in the middle Yangtze region, cutting off any Chen forces that might have been able to come to the aid of Chen's capital Jiankang. Heruo soon defeated and captured the Chen general Xiao Mohe, who was making a final attempt to repel Heruo and Han's forces from Jiankang, and Jiankang fell immediately after. Chen Shubao was captured but not harmed. Rather, he and his clan members were transported to Chang'an, where Emperor Wen treated them as honored guests. Some Chen generals briefly resisted, but soon the Sui had control. The Southern and Northern Dynasties period was over, and Sui had united China. Much as how he had torn down Yecheng after Yuchi defeat, Emperor Wen tore down Jiankang, establishing only a minor garrison at the nearby Shitou as Jiang Province (蔣州).

Late Kaihuang era
In 590, apparently jealous of the talent of the official Li Delin, who had been key in his takeover of power as regent and who had contributed to the strategies in conquering Chen, Emperor Wen, believing in several false accusations against Li, removed Li from his office and made him a provincial governor. Li would not return to the central government for the rest of his life.

After Chen was conquered, Sui began to apply its laws over Chen's former territory—which brought resentment from the gentry, as they had been treated preferentially under Chen and its predecessor dynasties in the south. Su Wei further wrote a work known as the Five Teachings (五教, Wu Jiao) which is no longer extant but thought to be a work about loyalty to Sui and ordered that all former Chen subjects read and memorize it, leading to further resentment. When a rumor spread that Sui would move Chen subjects into the Guanzhong region in 590, nearly all of former Chen realm rose in rebellion, but in an unorganized manner. Emperor Wen sent Yang Su to quell the rebellions, and the rebels were no match for Yang Su; within the year, the rebellions were put down.

In 591, Tuyuhun sought peace and, as per custom, its khan Murong Shifu (慕容世伏) offered his daughter to be a concubine for Emperor Wen. Emperor Wen accepted the peace offer but declined the offer of Murong Shifu's daughter. (It was, however, around this time that he did take Chen Shubao's sister and another woman from Jiankang, Consort Cai, as concubines, although it appeared likely that Consort Cai was never able to have sexual relations with Emperor Wen while Empress Dugu was alive; Consort Chen, as the sister of a submissive former sovereign, might have had sexual relations with Emperor Wen on an infrequent basis, but it is not clear.)

In spring 592, the official He Tuo (何妥), who, despite his senior status over Su Wei's son Su Kui (蘇夔), was losing out against Su Kui over a debate as to the designation of official music styles for Sui. In anger, He Tuo accused Su Wei of factionalism, and after investigation by Emperor Wen's son Yang Xiu and the official Yu Qingze (ted zhang), Su Wei was removed from office. After Su Wei's removal, Yang Su and Gao Jiong became effectively the co-prime ministers. When Heruo Bi, who believed that he should have been prime minister, complained, Emperor Wen removed him from his post as well and stripped him of his ducal title, but restored the ducal title a year later. (Su Wei, however, was back in his post at the latest by 595.)

Also in 592, Emperor Wen, reacting to an overflowing abundance of food and silk in the governmental stores, reduced the taxes heavily, and he also sent messengers around central China, redistributing land to give the poor farming land.

In 593, Emperor Wen commissioned a summer vacation palace, Renshou Palace (仁壽宮, in modern Baoji, Shaanxi), away from Chang'an, with Yang Su in charge of the project. The palace was far more luxurious than Emperor Wen expected, and its construction cost many lives. (When it was completed in spring 595 and Emperor Wen visited the palace, he was initially very displeased with Yang Su, but Empress Dugu persuaded him that Yang Su knew that he had little other entertainment, and she awarded Yang Su much treasure to show appreciation.)

Also in 593, knowing that the Princess Dayi was still resentful of him, Emperor Wen had the official Pei Ju inform the cousin and subordinate khan to Tujue's Dulan Khan, Ashina Yongyulü, the Tuli Khan Ashina Rangan (son of Ashina Chuluohou) that he would let Ashina Rangan marry a Sui princess if Ashina Rangan was able to get Princess Dayi killed. Ashina Rangan, in response, accused Princess Dayi of adultery, and Ashina Yongyulü killed her and requested another marriage with Sui. Instead, Emperor Wen agreed to marry a princess to Ashina Rangan, in order to create greater friction between them.

In 594, in response to another famine in the Guanzhong region, Emperor Wen again temporarily took up residence in Luoyang. He also, to share in some of his people's suffering, abstained from meat for a year.

Late in 594, Yang Guang submitted a petition that Emperor Wen carry out the ancient ceremonies of worshipping the heaven and earth gods at Mount Tai. Emperor Wen declined to carry out a full set of ceremonies due to its costs, but in spring 595] carried out an abbreviated version to seek blessings from the gods due to the ongoing drought.

Also in spring 595, Emperor Wen ordered that no weapons be held by private individuals and that all of them be collected and destroyed, although he exempted the border provinces from this edict.

In 596, Emperor Wen created a daughter of a clansman the Princess Guanghua and married her to Murong Shifu, to cement the peaceful relations with Tuyuhun.

In 597, Cuan Wan (爨翫), the chief of the Nanning Tribe (南寧夷, located in modern Qujing, Yunnan), rebelled. Emperor Wen sent the general Shi Wansui (史萬歲) the Duke of Taiping against Cuan, forcing him to surrender. Initially, Shi was to take Cuan to Chang'an to be presented to Emperor Wen, but Cuan bribed Shi, and so Shi allowed him to stay. Also in 597, Li Guangshi (李光仕), the chief of the aborigine people in Gui Province (桂州, roughly modern Guilin, Guangxi), also rebelled. Emperor Wen sent the generals Wang Shiji (王世積) and Zhou Fashang (周法尚) against Li, and Zhou was able to defeat and kill Li. However, in the fall, Li Shixian (李世賢), who might have been related to Li Guangshi, rebelled at Gui Province, and Emperor Wen sent Yu Qingze the Duke of Lu to attack Li Shixian; Yu was successful in suppressing the rebellion. Subsequently, however, Yu's brother-in-law Zhao Shizhu (趙什住), who had an affair with Yu's concubine, falsely accused Yu of treason, and around the new year 598, Yu was executed.

Also in 597, Emperor Wen felt that the punishment for official misconduct was too light, and authorized that supervising officials would be permitted to batter their subordinates with large canes if they felt that the legally prescribed punishment was too light in comparison to the degree of misconduct. Further, also believing that there was too much theft and robbery throughout the realm, he increased the punishment for theft to death—a law that he subsequently abolished.

Also in 597, Emperor Wen's son Yang Jun the Prince of Qin, the commandant at Bing Province (并州, roughly Taiyuan, Shanxi), was poisoned, but not to death, by his jealous wife Princess Cui. After Yang Jun was taken back to Chang'an for treatment, Emperor Wen discovered that Yang Jun had been wasteful at his post, and removed him from all of his offices, allowing him to only retain the title of imperial prince. When Princess Cui's poisoning was discovered, Emperor Wen ordered Yang Jun to divorce her, and subsequently ordered her to commit suicide. When Liu Sheng (劉昇) and Yang Su suggested that the punishment against Yang Jun was overly severe, Emperor Wen responded to Yang Su:


 * I am the father of just five sons, not the father of all people over the land. If I agreed with you, does that mean I have to draft a Penal Code for the Emperor's Sons?  Even a man as kind as the Duke of Zhou executed his brothers, the lords of Guan and Cai, for their crimes.  I am nowhere as capable as the Duke of Zhou, so I can break my own laws?

Also in 597, Ashina Rangan arrived at Chang'an, and Emperor Wen gave him the daughter of a clansman, whom he created the Princess Anyi, to be his wife, and awarded Ashina Rangan with much treasure, to try to break the bond between him and Ashina Yongyulü. From this point on, whenever Ashina Yongyulü would prepare to attack, Ashina Rangan would report his plans to Emperor Wen, allowing Sui forces to become prepared.

In 598, King Yeong-yang of Goguryeo attacked Ying Province, and while the governor of Ying Province, Wei Chong (韋沖), fought off the Goguryeo attack, Emperor Wen was angered. He sent his son Yang Liang the Prince of Han and Wang Shiji to serve as commanding generals, with Gao Jiong serving as Yang Liang's assistant, and the former Chen general Zhou Luohou (周羅睺) serving as the commander of the navy, to attack Goguryeo. However, the forces ran into food supply problems, and the ships ran into a storm and suffered great losses. Both at sea and on the ground, Goguryeo forces inflicted heavy losses on the Sui forces. Nevertheless, King Yeong-yang ceased his raids into China and so Emperor Wen called off the campaign against Goguryeo, unable to commit yet another enormous force to punish Goguryeo after the recent losses. As King Wideok of Baekje offered assistance to Sui during the campaign, this precipitated a conflict between Goguryeo and Baekje.

Also in 598, Cuan Wan rebelled again, and Yang Xiu accused Shi of accepting bribes from Cuan earlier. Emperor Wen considered executing Shi, but ultimately chose only to remove him from his posts, and it appeared soon after Shi was restored to his post.

In 599, after Ashina Rangan reported that Ashina Yongyulü was planning to attack, Emperor Wen took preemptive action and had Gao Jiong, Yang Su, and Yan Rong (燕榮) command a three-pronged attack against Ashina Yongyulü, with Yang Liang in nominal command but not at the frontline. In response, Ashina Yongyulü and Ashina Dianjue made a joint attack against Ashina Rangan, defeating him and largely seizing his tribe. Ashina Rangan fled to Sui, and Emperor Wen treated him as an honored guest. Subsequently, both Gao Jiong and Yang Su engaged Tujue forces and repelled them.

Also in 599, with Wang Shiji's subordinate Huangfu Xiaoxie (皇甫孝諧) accusing Wang of treason after Wang refused to shield Huangfu after he committed crimes, Emperor Wen believed Huangfu and executed Wang.

By this point, Yang Yong the Crown Prince had lost the favor both Emperor Wen and Empress Dugu, over his being overly wasteful (which displeased Emperor Wen) and having many concubines (which displeased Empress Dugu). They therefore considered deposing him and replacing him with Yang Guang. When Empress Dugu hinted as such, Gao Jiong stated clear opposition. Meanwhile, Emperor Wen himself had engaged in sexual relations with Yuchi Jiong's granddaughter, who had been made a servant after her grandfather's defeat—and when Empress Dugu found out, she had Yuchi Jiong's granddaughter killed. Emperor Wen was exceedingly angry and rode away from the palace on a horse, returning to the palace only at the urging of Gao and Yang Su—but with Gao further angering Empress Dugu when Gao referred to her as "a woman." In 599, Gao was accused of associating with Wang Shiji and removed from his posts. Subsequently, Gao was accused of cursing Emperor Wen, but when the sentence of death was recommended, Emperor Wen commented that he could not kill Gao soon after killing Yu and Wang, and therefore only reduced Gao to commoner rank.

In winter 599, Emperor Wen created Ashina Rangan Qimin Khan, and commissioned Zhangsun Sheng to build the city of Dali (大利, in modern Hohhot) to house Ashian Rangan's people, and also sent an army to protect Ashina Rangan. By now, the Princess Anyi had died, and Emperor Wen married another daughter of a clansman, whom he created the Princess Yicheng, to marry Ashina Rangan. Soon thereafter, Ashina Yongyulü was assassinated, and Ashina Dianjue declared himself Bujia Khan. In summer 600, Ashina Dianjue attacked Ashina Rangan, and Sui forces fought off Ashina Dianjue's attack, further causing Ashina Rangan to be grateful to Sui.

In fall 600, with Yang Guang and Yang Su forming a faction, with tacit support of Empress Dugu, they had Yang Yong's associate Ji Wei (姬威) falsely accuse Yang Yong of plotting treason. Emperor Wen deposed Yang Yong and replaced him with Yang Guang. Emperor Wen also put a number of officials whom he believed to be part of Yang Yong's faction, including Shi and Yuan Min (元旻) the Duke of Wuyuan, to death.

Renshou era
In 602, Empress Dugu died, and Emperor Wen was greatly saddened. Thereafter, he began to engage in sexual relations with his concubines, favoring Consorts Chen and Cai.

Also in 602, Yang Guang, believing that Yang Xiu would eventually create trouble for him, had Yang Su collect evidence of Yang Xiu's wastefulness and use of items that were only appropriate for emperors. Yang Su submitted the evidence to Emperor Wen, and Emperor Wen, in anger, recalled Yang Xiu to the capital. After Yang Xiu arrived at the capital, Yang Guang further manufactured evidence that Yang Xiu had cursed Emperor Wen and Yang Liang. In anger, Emperor Wen reduced Yang Xiu to commoner rank and put him under house arrest.

In 603, Ashina Dianjue, faced with rebellions from the Tiele and Pugu (僕骨) tribes, surrendered to Ashina Rangan. By now, Ashina Rangan became the undisputed khan of the Tujue.

In spring 604, Emperor Wen, as per his custom, went to Renshou Palace to avoid the heat, despite warnings from the sorcerer Zhangchou Taiyi (章仇太翼) that if he went, he would never return. While there, he grew ill, and in fall 604, he died. He was buried with Empress Dugu, but not in the same burial chamber.

How Emperor Wen died, however, is a matter of historical controversy. Most traditional historians relay and believe an account in which, while Emperor Wen was ill, Yang Guang tried to rape Consort Chen. When she reported the attempted rape to Emperor Wen, he became angry and had the officials Liu Shu (柳述, the husband of his daughter Yang Awu (楊阿五) the Princess Lanling) and Yuan Yan (元巖) the Duke of Longgu summon Yang Yong, intending to restore him. When Yang Guang found out, he, in association with Yang Su, had Liu and Yuan arrested, and then sent his associate Zhang Heng (張衡) to kill Emperor Wen, and Zhang did so. Soon thereafter, he forced Consorts Chen and Cai to become his concubines and had Yang Yong put to death, and only then announced Emperor Wen's death and took the throne (as Emperor Yang).

The historian Sima Guang, in his Zizhi Tongjian, borrowing parts of analyses from the Book of Sui and the History of the Northern Dynasties, opined:


 * Gaozu [Emperor Wen's temple name] was by nature cautious and solemn, and he always made sure that his orders are carried out, whether it be an order for an affirmative act or for a prohibition. He got up early in the morning to host imperial gatherings, and he would not appear tired even after noon.  Although he was himself stingy, but he did not hold back his awards when rewarding the people with accomplishments.  He gave much compensation to the families of soldiers who died in battle, and sent messengers to comfort them.  He loved his people, encouraging them to till the field and grow mulberries, and decreasing their labor and tax burdens.  He himself lived simply and frugally, and the vessels and clothes he used, even after they became worn out, continued to be patched and used.  Except at feasts, his meals would contain a single meat dish.  The clothes of the palace women were continued to be used even after they were washed.  Based on his influence, during his reign, men only wore cotton and cloth, not silk, and their decorations were made of copper, iron, bones, and horns, not gold, silver, or gemstones.  There were bountiful productions of food and textile, so much so that the storage was insufficient for them.  At the start of his reign, the census rolls only had less than four million households, but at the end of his reign, there were almost nine million households, and Ji Province [(冀州, roughly modern Hengshui, Hebei)] by itself contained one million households.  However, he was suspicious, critical, and picky, believing many alienating words of his officials.  Therefore, even of those with the most accomplishments and his old friends, not one was able to maintain the relationship from start to end.  He even treated his own sons as enemies.  These were his faults.

Wendi also established seven orchestras comprising musicians from across Asia at his court; these orchestras were expanded to nine by his son Emperor Yang of Sui.

Personal information

 * Maternal Grandfather
 * Lü Shangzhou (呂雙週), posthumously elevated to the rank of Zhuguo (追贈上柱國)
 * Maternal Grandmother
 * Lady Yao (姚氏), created Lady of Qi (齊郡夫人)
 * Father
 * Yang Zhong (楊忠), Duke Huan of Sui (507–568)
 * Mother
 * Lü Gutao (呂苦桃), presumably Yang Zhong's wife
 * Wife
 * Empress Dugu Qieluo (created 581), mother of all of Emperor Wen's children
 * Major Concubines
 * Consort Chen (577–605), daughter of Emperor Xuan of Chen
 * Consort Cai
 * Sons
 * Yang Yong 楊勇, the Crown Prince (created 581, deposed 600, executed by Emperor Yang of Sui 604)
 * Yang Guang 楊廣 (569 – 10 April 618), initially the Duke of Yanmen, later the Prince of Jin (created 581), later the Crown Prince (created 600), later Emperor Yang of Sui
 * Yang Jun 楊俊 (571–600), Prince Xiao of Qin (created 581, d. 600)
 * Yang Xiu 楊秀 (573–618), initially the Prince of Yue (created 581), later the Prince of Shu (created 581, reduced to commoner rank 602, killed by Yuwen Huaji 618)
 * Yang Liang 楊諒 (575–605), the Prince of Han (created 581, reduced to commoner rank 604)
 * Daughters
 * Yang Lihua 楊麗華 (561–609), empress to Emperor Xuan of Northern Zhou; later the Princess Leping
 * Princess Xiangguo, married Li Changya (李長雅)
 * Princess Guangping, married Yuwen Jingli (宇文靜禮), son of Yuwen Qing (宇文慶)
 * Princess Wan'an, married Dou Rong, Duke of Chen (陳國公竇榮) and had a son Dou Kang (竇抗)
 * Yang Awu 楊阿五 (573–604), the Princess Lanling; married firstly Wang Fengxiao (王奉孝); remarried after Wang's death to Liu Shu (柳述), who later became Minister of Defense under Emperor Yang