Emperor Wen of Sui

Yang Jian was the first ethnic Han ruler to control the entirety of North China after the Xianbei people conquered the region from the Liu Song dynasty (not counting the brief reconquest by Emperor Wu of Liang).

At the beginning of his reign, Sui faced the threat of the Göktürks in the north, neighbored Tibetan tribes in the west, Goguryeo in the northeast, and Champa (Linyi) in the south.

Yang Jian was a member of the northwestern Chinese military aristocracy which had arisen during the previous period of division, and he had served as a general under the Xianbei-led Northern Zhou.

Yang Jian's mother was Lady Lü, who gave birth to him in a Buddhist temple in Pingyi (馮翊, in modern Weinan, Shaanxi).

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 Commandery (大興郡公).

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.

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.

(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 "隋".)

The Book of Sui records Emperor Wen as having withdrawn his favour from the Confucians, giving it to "the group advocating Legalism and authoritarian government.

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.

The qaγan's wife, the Xianbei princess Qianjin, Yuwen Zhao's daughter, particularly hated Emperor Wen for destroying the Northern Zhou.

Ishbara 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, under advice from the general Zhangsun Sheng (長孫晟), Emperor Wen carried out the strategy of placating Ishbara's subordinate qaγans—his cousins Tardu (阿史那玷厥) and Apa (阿史那大暹便), and brother Ashina Chuluohou (阿史那處羅侯) – to create dissension within the Göktürks, and gradually, the strategy worked, causing the Göktürks to be unable to take unified actions against Sui.

By spring 583, the Göktürks' 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.

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.

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.

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 (蔣州).

In 591, Tuyuhun sought peace and, as per custom, its khan Murong Shifu (慕容世伏) offered his daughter to be a concubine for Emperor Wen.

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.

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.

Also in 597, Li Guangshi (李光仕), the chief of the aborigine people in Gui Province (桂州, roughly modern Guilin, Guangxi), also rebelled.

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.

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.

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.

Most traditional historians relay and believe an account in which, while Emperor Wen was ill, Yang Guang tried to rape Consort Chen.

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.

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.

Tomb guardian figurine, Sui dynasty