In the "Biography of the Two Dragons of the Great Tang" by the master of the martial arts novel Huang Yi, the "evil king" Shi Zhixuan, in order to revitalize the Demon Gate, once entered the Sui court under the pseudonym Pei Zhi to help Emperor Jue pass through the western regions, divide the Turks, and make an immortal contribution. However, just when the Sui Emperor was satisfied, Pei Ji instigated him to conquer Goguryeo, which led to a serious injury to the empire's vitality and eventually collapsed. In this way, Pei Zhi can be called the culprit who led to the demise of the Sui Dynasty.

Stills of Shi Zhixuan in "The Legend of the Tang Dynasty Double Dragon"
In fact, there is indeed a person in history, as a confidant of the Sui Emperor, he has done things such as skimming the Western Regions, dividing the Turks, and instigating the Emperor to attack Goguryeo, which is basically consistent with the description in the "Biography of the Double Dragon of the Tang Dynasty", but its ending is very different (in the novel, Pei Zhi finally converted to Buddhism). So, what kind of legend is Pei Zhi in history? What was his final outcome?
Pei Zhi was born in the last year of the Eastern Wei Dynasty, and was the grandson of Pei Tuo of the Northern Wei Jingzhou Assassin Shi Pei Tuo, and the son of Pei Ne, the Prince of Northern Qi. Pei Zhi has been diligent and intelligent since childhood, not only writing articles well, but also quite scheming ("Moment is swaddled and lonely, and is eager to learn, loves weeds, and has wisdom.") See Book of Sui, Vol. 67, Liechuan Xxxi-32 Pei Zhi).
Emperor Wen of Sui was very serious about Pei Zhi
Pei Zhi served in Northern Qi as Sizhou Bing Cao (司州兵曹持) and Gaoping Wang (高平王文), and after the fall of Northern Qi, he was transferred to Northern Zhou, and was enlisted as a recorder by Yang Jian of Dingzhou, and was deeply respected. After Yang Jian took charge of the imperial government as a chancellor, Pei Zhi actively advised him, helping him eliminate dissidents and seize the throne, making great achievements. After the establishment of the Sui Dynasty, Yang Jian promoted Pei Zhi to be a shilang and acting neishi sheren, and although the official quality was not high, it was extremely powerful.
In the Sui Dynasty's campaign against Chen, Pei Zhi served as the secretary of marshal Yang Guang, and was deeply relied on by the latter. Pei Zhi not only had a high level of strategy, but also had great military talent, and during the period of pacifying Lingnan, he was able to lead three thousand pawns from today's Ganzhou to Guangzhou, and to stabilize more than twenty prefectures in Lingnan, and for a time the sound shook the sea. When Emperor Wen of Sui heard the news, he not only worshipped Pei Zhi as a waiter in neishi, but also made him the Duke of Wenxi County.
Pei Zhilian strategized to split the Turks into two parts
During the reign of Emperor Wen of Sui, the Turkic forces in northern Mobei were strong and repeatedly moved south, threatening the security of the Central Plains. In this regard, Pei Zhi repeatedly used tactics to create contradictions between the chiefs of the various tribes, thus dividing the Turks into two major divisions, the East and the West, and no longer being able to join forces to invade the Central Plains. During this period, Pei Zhi was promoted to the rank of official attendant for his meritorious efforts in dividing the Turks and comforting the Qimin Khan, and later to the rank of Shangshu Zuocheng (尚書左丞), and later promoted to the rank of official attendant for his meritorious service in jointly formulating the funeral system with Niu Hong.
Although Pei Zhi's talent is far beyond ordinary people, his character seems to be poor, and he is an "official oil son" who sees the wind and rudder and is extremely treacherous, and knows how to speculate on the holy will. Therefore, as soon as the Sui Emperor came to power, Pei Zhi, a minister of Neng, began to transform into a minister of chaos.
The Sui Dynasty Emperor was a good emperor who was very obsessed with the situation of "four seas and all nations coming to the dynasty". In order to curry favor with the emperor, Pei Zhi did his best to help him realize his dream, first lobbying the countries in the western region to pay tribute to the Sui Dynasty, and then joining forces with Tiele and other troops to attack Tuguhun and expand thousands of miles to the northwest region, and soon after instigating the Western Turks to attack the Eastern Turks, forcing the Eastern Turks to submit to the Sui Dynasty.
During the reign of the Sui Dynasty Emperor, he was very happy and successful, and he was poor in military force
After this series of operations, more than thirty countries in the western region were declared vassals, Tuguhun was far away, the Eastern Turks were paid, and the Western Turks lost their sincerity, and the surrounding countries almost all became vassals of the Sui Dynasty, but Goguryeo refused to submit. For this only "defect", the Sui Emperor had not yet expressed anything, but Pei Zhi stood up to express his dissatisfaction and strongly advocated the use of troops against Goguryeo until it submitted. Emperor Jue thought that Pei Zhi's words were very reasonable, and the conquest of Goguryeo was determined.
"The land of Goryeo, the land of Ben lonely bamboo country." The Zhou Dynasty was enfeoffed to Jizi, and the Han Dynasty was divided into three counties, and the Jin clan also ruled Liaodong. Now is not a vassal, do not be a foreign land... When Your Majesty is at the time, Andrew is not in trouble, so that the realm of this crown belt is still the land of barbarians? Emperor Yue: "How?" "Please face his envoys, release them to your own country, send a message to your king, and order the speedy dynasty to look at." Otherwise, when the Turks are led, they will be punished on the same day. "Tina. Gao Yuan did not need his life, and began to build a strategy to conquer Liao. Ibid.
Map of the Sui Dynasty's conquest of Goguryeo
From 612 to 614, the Sui Emperor devoted all his efforts to conquering Goguryeo three times, but after paying a heavy price, he only won the false submission of the King of Goguryeo. However, the Three Expeditions to Goguryeo dealt a devastating blow to the Sui Dynasty, causing large-scale civil unrest and rebellion throughout the country, and finally completely destroying the Sui Dynasty, which had only been established for 29 years. In 618, the Sui Emperor killed the general Yu Wenhua and Killed him in Jiangdu, and it was in that year that his cousin Li Yuan officially founded the Tang Dynasty.
After the fall of the Sui Dynasty, Pei Zhi, as the "culprit", did not choose to be martyred, but successively attached himself to the culture of Xu Diyu and Dou Jiande, the king of Xia, and made suggestions and suggestions in their army as usual, and was reused. After Dou Jiande was defeated and killed, Pei Ji turned to the Tang Dynasty, and because of his strong support for peace with the Turks, he was heavily respected by Tang Gaozu, who feared turks like a tiger, and was worshipped as the prime minister (Crown Prince Zhan Shi and Inspector Officiation).
Tang Taizong attached great importance to Pei Zhi
After Emperor Taizong of Tang ascended the throne, he liked the ministers to advise, and Pei Zhi, who was nearly eighty years old, transformed again, became a courtier who was highly praised by the emperor, and was appointed as the Minbu Shangshu ("The moment is eighty years old, and the essence is not fading, and it is very important to know the story. See Old Book of Tang, Biography of Pei Zhi). In the first year of Zhenguan (627), Pei Ji died of illness at the age of 80. After Pei Zhi's death, he was posthumously awarded the title of Dai prefecture assassin history, with the title of Jing.