Pei Yun was from Wenxi, Shanxi. His grandfather Pei Zhiping was a general during the Liang Dynasty. His father Pei Ji was the Minister of State of the Chen Dynasty, and later died in battle with Wu Mingche during the Northern Zhou Dynasty. He was posthumously titled Duke of Jiangxia by the Sui Dynasty and passed away after living in the Sui Dynasty for over a decade. Pei Yun was intelligent and talented, with a talent for governance. During the Chen Dynasty, he served as General of the Imperial Guard and Magistrate of Xingning County.
After his father's death in the north, Pei Yun secretly wrote a letter to Sui Gaozu, expressing his willingness to act as an insider. After the fall of the Chen Dynasty, Sui Wendi wanted to meet the officials and nobles from Jiangnan. When it was Pei Yun's turn, the emperor believed he had long desired to align with the court, so he directly promoted him and conferred him the title of Yitong. The Left Deputy Marshal Gao Feng was puzzled by the emperor's intentions and advised, "Pei Yun has not contributed much to the country, yet he is favored more than others. I think this is inappropriate." The emperor promoted Pei Yun by another rank, still as Yitong. Gao Feng advised again, and the emperor replied, "Then let’s promote him to Kaifu!" Gao Feng dared not say anything more. That day, Pei Yun was appointed as Kaifu Yitong of the Three Departments, and the emperor rewarded him with many things.
Later, he successively served as the governor of Yangzhou, Zhizhou, and Lizhou, and excelled in his duties. In the early period of the Sui Dynasty, his political performance consistently ranked at the top. Emperor Yang of Sui heard that he governed the region well, so he transferred him to the capital and appointed him as the Junior Minister of Rites. Sui Wendi was known for his dislike of extravagant music and dance performances and once sent Niu Hong to regulate music and dance, banning any unorthodox music and dance performances.
When Pei Yun arrived at the court of Emperor Yang of Sui, he guessed the emperor's thoughts and suggested that the descendants of musicians from the Zhou, Qi, Liang, and Chen dynasties be included in the music registry. Officials below the sixth rank, as well as commoners skilled in music, dancing, and acrobatics, were all sent directly to the Tai Chang Temple. From then on, a wide array of unusual skills and melodies converged at the Tai Chang Temple, where they were assigned teachers to teach each other. The number of musicians swelled to over 30,000. Emperor Yang of Sui was very pleased and promoted Pei Yun to be an assistant minister of the Ministry of Civil Affairs.
At that time, during the reign of Emperor Gaozu of the Sui Dynasty, the country was relatively loosely managed, and population registration was chaotic, with many people not registered. Some people pretended to be children when it was time for military service, while others escaped taxes and forced labor before reaching old age. After becoming a governor, Pei Yun knew about this and petitioned the court to conduct a careful review of the population. If anyone was found to be cheating, those officials would be dismissed, and local leaders would be exiled to remote areas. He also allowed the common people to report each other, and if someone reported a person who had underreported their population, that person's family would have to pay taxes and forced labor on their behalf. In the fifth year of Daye, after the counties had completed their census, it was reported that there were 243,000 newly registered population and 641,500 newly affiliated population. After reading the report in court, the emperor said to the officials, "Those officials who came before were inadequate, leading to so many people underreporting. Now that the population registration has become so accurate, it is all thanks to Pei Yun's careful responsibility. The ancients said 'govern with the virtuous,' and this is truly correct!" From then on, the emperor increasingly trusted Pei Yun and promoted him to be the deputy of the mayor of Jingzhao. Pei Yun worked meticulously and conscientiously, earning both the respect and fear of officials and commoners alike.
Not long after, he was promoted to the position of Imperial Censor, and alongside Pei Ju and Yu Shiji, he oversaw confidential matters. He was particularly good at understanding the emperor's thoughts. If the emperor wanted to accuse someone, he would manipulate the law to serve the emperor's wishes and solidify the charges. If the emperor wanted to pardon someone, he would impose a lighter punishment and allow that person to be released. Eventually, he was entrusted with all major and minor cases. He was in charge of supervising the officials in the Court of Judicial Review and handling cases there. No one dared to challenge his authority; they had to consult him first and follow his instructions before making decisions. He was also very eloquent. When discussing legal provisions, his words flowed like a waterfall. Whether a harsh or lenient judgment was needed, the final say rested with him. His analysis was impeccable, and no one could refute him at that time.
When Yang Xuangan rebelled, the emperor dispatched him to investigate Yang Xuangan's accomplices. The emperor said to him, "With just one call from Xuangan, ten thousand people responded. This demonstrates that people are reluctant to live honestly. When there are many people, it is easy for them to gather as thieves. If we do not impose severe punishments, no one will listen in the future." So he rigorously enforced the law, killing tens of thousands of people and seizing their property. The emperor was very pleased and granted him fifteen slaves. The Minister of Justice, Xue Daocheng, was demoted because he had offended the emperor. Knowing that the emperor disliked Xue Daocheng, he submitted a memorial saying, "Xue Daocheng is arrogant and disrespectful, showing no regard for the emperor. Every time he receives an imperial edict, he secretly criticizes it and shifts responsibility onto the state, willfully instigating trouble. Although his crimes may not be obvious on the surface, his intentions are outright treacherous!" The emperor said, "Yes! When I was young, we worked together, but he looked down on me as a child. He and Gao Feng, He Ruobi, and others monopolized power without authorization. He knew he deserved death. After I ascended the throne, he was always uneasy because he never had the chance to rebel. What you’ve said resonates with my own views!" Thus, Xue Daocheng was executed.
Later, the emperor asked Su Wei about the strategy for attacking the Liao Kingdom. Su Wei was reluctant to have the emperor send troops again and wanted him to know that there are many bandits out there. He deliberately replied, "If you issue an amnesty for those bandits, you could rally hundreds of thousands to your side. You could recruit some bandits from within our borders, as well as people like Fei and Zhang Jincheng from the Lishan region of Shandong, to launch an attack from the west against Liao; bandits like Wang Bao and Meng Rang from Henan could be given ships to attack from the sea. They'd be thrilled to be pardoned and would eagerly seek to prove themselves. Within a year, Goryeo will be wiped out." The emperor said unhappily, "I couldn't achieve success in battle even when I led the charge myself; can these thieves and rogues do it?" After Su Wei left, he reported, "Su Wei is simply disrespectful; where do you find so many bandits in the world?" The emperor understood and said, "This old man is quite cunning, trying to manipulate me into listening to him; I can only endure this, and it's truly frustrating!" He knew the emperor's meaning, so he sent Zhang Xingben to report Su Wei's crimes. The emperor entrusted him with the trial of this matter and finally sentenced Su Wei to death. The emperor said, "I truly don't have the heart to execute him immediately." So Su Wei, his son, and his grandson were all stripped of their ranks.
He wanted to increase his power, so he had Yu Shiji submit a memorial to dismiss officials below the rank of provincial officials and increase the number of Imperial Censors by over a hundred. This attracted many deceitful individuals who conspired with one another, formed factions, and secretly plotted against those officials who did not obey him. At that time, there were many important national affairs, and all military actions, the defense of the capital, and trade with various minority groups were supervised by the Imperial Censors. His guests and subordinates were spread throughout the land, oppressing the people, but the emperor was unaware. Due to his participation in the war against the Liao Dynasty, he was promoted to the rank of Silver Seal Grand Minister. When Sima Dekan was about to rebel, the county magistrate of Jiangyang, Zhang Huishao, came to report to him overnight. He and Zhang Huishao conspired to forge an imperial edict, mobilize the troops and civilians in the Guoxia region, seize the military power of Rong Gonglai Hu'er, arrest Yu Wenhua and his fellow rebels who were outside, then mobilize the Imperial Guard and the Palace Guards, and send Fan Fulu and others to enter the palace from the West Park to arrest Liang Gong Xiao Ju and the Prince of Yan, and protect the emperor. After the plan was set, he sent someone to inform Yu Shiji. Yu Shiji suspected that the news of the rebellion was false and stopped their plan. Soon, the rebellion broke out, and he sighed, "The plan leaked, and in the end, it ruined everything." So he was killed. His son, Ying, was the Chief of the Imperial Transport and was killed the same day. Pei Ju, styled Hongda, was from Wuxi, Hedong. His grandfather, Pei Ta, served as the Minister of the Imperial Secretariat in the Wei Dynasty; his father, Pei Nezhi, served as the Crown Prince's Attendant in the Qi Dynasty. Pei Ju became an orphan at a young age, and as he grew up, he was especially studious, had a passion for literature, and was known for his wisdom and strategic thinking. His uncle, Pei Rang, recognized his talent and told him, "I see your potential to become an outstanding individual. If you want to achieve something in the officialdom, you should pay closer attention to national affairs." From then on, Pei Ju began to pay attention to current affairs.
During the reign of Gaozhen, the King of Beiqi, as Governor of Sizhou, he hired Pei Ju as a military official and later promoted him to the position of Literary Official for the Gaoping King. After the fall of Beiqi, Pei Ju was unable to find a suitable position. When Emperor Wen of Sui, Yang Jian, served as the Governor of Dingzhou, he summoned Pei Ju to serve as a secretary and held him in high regard. Following his mother's death, Pei Ju resigned from the post and returned home to mourn. When Emperor Wen became Prime Minister, he sent someone to urgently bring him back and appointed him as a secretary in the Prime Minister's office. After Emperor Wen became Emperor, Pei Ju was promoted to the position of Attendant Gentleman, and then he resigned from this position.
During the Sui Dynasty's campaign against the Chen Dynasty, Pei Ju served as a secretary in the Marshal's office. After the fall of the Chen Dynasty, Prince Jin, Yang Guang, ordered Pei Ju and Gao Feng to seize the Chen Dynasty's archives. The following year, the court issued a decree for Pei Ju to oversee Lingnan, but before he could set out, Gao Zhihui, Wang Wenjin, and others rebelled together, blocking the roads in the Wu and Yue areas, which made it difficult for the court to send Pei Ju. Pei Ju requested to set out immediately, and the Emperor agreed. He made his way to Nankang and recruited several thousand troops.
At that time, Wang Zhongxuan, the tribal leader, was besieging Guangzhou and sent his general Zhou Shiju to besiege Donghengzhou. Pei Ju and General Lu Yuan went to rescue, and the rebels set up nine checkpoints in the mountains, stationed troops at Dayuling, and supported each other. Pei Ju launched a fierce attack, defeated the rebels, who, fearing defeat, lifted the siege on Donghengzhou and retreated to Changling. Pei Ju led the army to attack again, defeated the rebels once more, killed Zhou Shiju, and then advanced from Nanhai to relieve Guangzhou. Wang Zhongxuan fled in fear. Pei Ju subdued more than twenty states and was granted the authority to appoint those leaders as governors and magistrates.
After Pei Jukai triumphantly returned to the court, the emperor was very happy and summoned him to the palace to commend his hard work. In front of Gao Feng and Yang Su, the emperor said, "Wei Guang led twenty thousand troops but could not cross the mountains in time; I have been worried about insufficient military strength. Pei Jukai only brought three thousand weary soldiers and reached Nankang directly. With such a loyal subject, what else is there to worry about!" Because of his achievements, Pei Jukai was appointed as Governor, granted the title of Count of Wenxi, and rewarded with a large amount of wealth. Later, he was appointed as the Minister of the Ministry of the People and soon promoted to the Minister of the Interior.
At that time, the Turkic forces were quite powerful, and their Khan's wife, Princess Dayi, was actually a daughter of the Yuwen family, causing trouble on our borders. Later, the princess became involved with the Turkic people, and Chang Sun Cheng was the first to discover this. He suggested to the emperor to send him to negotiate with the Khan and eliminate the Yuwen family. The emperor agreed. Consequently, the princess was executed.
Afterwards, the Khan fell out with the Turkic Khan and frequently invaded our borders. The emperor assigned Taiping Gong Shi Wansui as the commander of the expedition, starting from Dingxiang, with Chang Sun Cheng as the chief of staff. They defeated the Khan and restored peace. Unfortunately, Shi Wansui was later beheaded, and his achievements were not recognized. When Qimin Khan surrendered, the emperor sent Chang Sun Cheng to appease him, and upon his return, he was promoted to the Deputy Minister of the Left.
That year, Empress Wenxian passed away. At that time, the court lacked established ceremonial procedures. Chang Sun Cheng and Niu Hong referred to the etiquette of the Qi State and established a new set of funeral rites. Later, Chang Sun Cheng was promoted to the Deputy Minister of the Ministry of Personnel, and everyone thought he was doing well. After Emperor Yang of Sui took the throne, he wanted to build the Eastern Capital, and Chang Sun Cheng oversaw the construction of the palace and government offices, completing the project in just ninety days.
At that time, many merchants from the Western Territories came to Zhangye to do business with us. The emperor assigned Changsun Cheng to oversee these matters. Changsun Cheng knew that the emperor was planning to expand westward, so he subtly encouraged those merchants to elaborate on the customs, geography, and the challenges of the roads in their respective countries. In the end, he compiled this information into a book called "Records of the Western Territories," consisting of three volumes, and then submitted it to the emperor at court. The book's preface begins:
I have heard that even when Emperor Yu governed the Nine Provinces and diverted the Yellow River, he could not make the waters of the Yellow River flood over the Jishi Mountain; when Qin Shi Huang unified the six states and set up defenses, it only reached Lintao. Therefore, I know that those of mixed ethnicities among the barbarians in the Western Territories live in remote and desolate places, where the cultural norms and teachings have not penetrated, and there are few records of them in history books.
Since the founding of the Han Dynasty, records of the names of Western Territories began to emerge with the development of the Hexi Corridor, totaling thirty-six, which later fragmented into fifty-five smaller kingdoms. The court appointed military officials to recruit and pacify them. However, their allegiances shifted frequently between rebellion and submission, and wars occurred frequently. By the Eastern Han period, the court had abolished these official positions several times. Although the population estimates began to be recorded from Dawan onwards, the names of the mountains and rivers of each country were not detailed. There are no records whatsoever of their surnames, customs, clothing, or specialties, leaving the world largely uninformed.
Moreover, due to the long passage of time, as well as the annexation and conquests, the rise and fall of these countries have become complicated and difficult to discern. Some regions that were once independent states have changed names, while some ethnic groups, although not the original inhabitants, have retained the old names. Furthermore, with frequent border changes and language barriers, it is very challenging to clarify these matters. Historical records indicate that there were over thirty countries north of Yutian and east of Congling. In time, these countries waged war against one another, resulting in the survival of only a handful. The remaining countries vanished, leaving behind only ruins that are difficult to recall.
Your Majesty, you are kind and care for the people, regardless of whether they are from the Central Plains or foreign tribes. All the people in the world long for your grace. Envoys from all over the world come to pay their respects to you, from the place where the sun rises to where it sets, without distinction of distance. As the manager of the border markets, I have collected historical materials and visited the non-Han people. When I come across something unclear, I inquire from various sources. Based on their clothing and appearance, I have drawn portraits of kings and people, compiling them into *Records of the Western Regions*, which records forty-four countries. I have also drawn a map, indicating the important geographical locations of each country.
From the west of the Western Regions to the south of the Northern Sea, the approximate distance from east to west and from north to south is around twenty thousand li. Thanks to those wealthy merchants who have traveled all over the Western Regions, they are very familiar with the situation in each country. There are some remote and desolate places that are difficult to investigate, so some places are not fully recorded. Before and after the Han Dynasty, the records of the Western Regions, where a population of several thousand people is called a king, are just empty names, not the actual situation.
The countries I have compiled now all have populations of over a thousand households and are situated near the Western Sea, known for their rare and exotic treasures. Mountainous tribal areas without official names or small tribes are largely unrecorded. From Dunhuang to the Western Sea, there are three main roads, each with its own routes. The northern route starts from Yiwu, passing through Pulei Sea, the Tele tribe, the Khan court of the Turks, crossing the Beiliu River, reaching Fuli country, and finally arriving at the Western Sea. The central route starts from Gaochang, Yanqi, Kucha, Shule, crosses the Congling Mountains, passes through Bohan, Suduoshana country, Kang country, Cao country, He country, Daixiaoan country, Mu country, reaches Persia, and finally arrives at the Western Sea. The southern route starts from Shanshan, Yutian, Zhujubo, Hepantuo, crosses the Congling Mountains, passes through Humi, Tuhuolu, Yida, Fuyan, Cao country, reaches Northern Brahman country, and finally arrives at the Western Sea. The countries along these three routes are also connected to each other, making transportation between the north and south convenient. Countries such as the Eastern Women's Country and the Southern Brahman Country are also situated along these routes.
So I know that Yiwu, Gaochang, and Shanshan are the gateways to the Western Regions, and Dunhuang is the key to the Western Regions. With the prestige of the country and the bravery of the soldiers, it is as easy as flipping a hand to advance westward; where can't we reach? It is just because the Turks and Tuyuhun occupy the lands of various Qiang and Hu countries, obstructing the tribute from the Western Regions to the court, causing the breakdown of communication between the court and the Western Regions. Now we use merchants to secretly send sincerity, and all the countries in the Western Regions are eagerly looking forward to it, willing to submit to the court. The emperor is kind and generous, bestowing blessings on the world; we should win them over to ensure stability and unity. Therefore, the court sent envoys to the Western Regions, and without needing to use the army, the countries in the Western Regions surrendered, and the Turks and Tuyuhun could also be conquered. Unifying China and the Western Regions is within our grasp! If these matters are not recorded, the profound impact of the court's civilization would go unrecognized.
The emperor was very happy and rewarded Pei Ju with five hundred pieces of silk. Every day, the emperor called Pei Ju to his side, personally inquiring about the situation in the Western Regions. Pei Ju boasted and said that there are many treasures in the Western Regions, and Tuyuhun can easily be conquered. The emperor was very pleased and decided to open up the passage to the Western Regions, entrusting Pei Ju with the governance of the Western Regions and the affairs of the surrounding ethnic minorities. Pei Ju was promoted to the Deputy Minister of the Ministry of People, and before taking office, he was promoted to the Minister of the Imperial Secretariat.
The emperor also sent Pei Ju to Zhangye to attract various tribes from the Western Regions; over ten countries came to join. In the third year of Daye, the emperor went to Mount Hengshan to perform sacrifices, and these Western Regions countries all participated. The emperor was preparing to inspect the Hexi Corridor and sent Pei Ju to Dunhuang. Pei Ju sent envoys to persuade King Qubo Ya of Gaochang and Tuntian She of Yiwu, promising them substantial rewards to bring them to the court.
When the emperor went on a western tour and arrived at Yanzhishan, the King of Gaochang and the King of Yiwu, along with twenty-seven other Western countries, came to pay their respects, all gathered along the road to welcome him. They were all dressed in gold and jade ornaments, draped in brocade, burning incense, and playing music while singing and dancing lively. The horseback crowd stretched for dozens of miles, showcasing the might of the great Sui dynasty. The emperor was greatly pleased by this sight.
Later, the Sui dynasty defeated the Tuyuhun, expanded its territory by thousands of miles, and stationed troops there. They received millions of tributes from there every year, and other minority ethnic groups were afraid and came to pay tribute one after another. The emperor believed that Pei Ju had a strategy to pacify the border, so he promoted him to the title of Yinqing Guanglu Dafu.
That winter, the emperor came to the eastern capital of Luoyang. Because there were many minority ethnic groups coming to pay tribute, Pei Ju suggested that the emperor hold a large-scale performance in Luoyang. So, various unique performances were gathered from across the country and showcased on Duomen Street, with over a hundred thousand people dressed in splendid attire and adorned with gold and silver jewelry. The emperor also commanded all officials and commoners, both men and women, to sit in pavilions and observe. Everyone wore bright clothes, and the performance lasted for a month before ending.
The emperor also ordered tents to be set up in three markets, with food and drink placed inside, allowing officials in charge of minority affairs to trade with minority ethnic groups and commoners. Wherever they went, they were invited to sit down and enjoy a hearty meal before departing. The minority groups were in awe, exclaiming that the great Sui dynasty was a place where immortals resided.
The emperor praised Pei Ju for his loyalty, saying to Yuwen Shu and Niu Hong, "Pei Ju understands my thoughts remarkably well. His suggestions align perfectly with my own plans. He can foresee things before they happen. Who else could achieve this if not for their unwavering dedication to the nation?"
The emperor sent General Xue Shixiong to construct fortifications in Yiwu and asked Pei Ju to accompany him to manage the region. Pei Ju persuaded the various countries of the Western Regions, saying, "The emperor built fortifications in Yiwu to facilitate trade with you." This reasoning resonated with everyone, leading them to cease their conflicts. After returning to the court, the emperor honored him with a reward of 400,000 coins.
Pei Ju submitted another memorial, proposing a strategy to create discord between Shekui and Chuluo, secretly attacking Chuluo. The specifics are documented in the "Chronicles of the Turks." Later, Chuluo was coerced by Shekui and eventually followed the envoy to the court. The emperor was greatly pleased and rewarded Pei Ju with a sable coat and treasures from the Western Regions.
The emperor inspected the northern frontier and happened to visit the camp of Qimin Khan. At this time, Goryeo sent envoys to contact the Turks first, and Qimin Khan did not dare to conceal it, bringing the envoys to see the emperor. Yang Ju then submitted a memorial, saying, "The territory of Goryeo originally belonged to the state of Goguryeo. During the Zhou Dynasty, it was granted to Jizi; during the Han Dynasty, it was divided into three commanderies; and during the Jin Dynasty, it was under the jurisdiction of Liaodong. Now, it has not submitted to us and has become an independent foreign nation, so the late emperor has been very angry and has long sought to attack it. It's just that Yang Liang was incompetent and did not win any battles. Now that you are the emperor, how can you allow this land, adorned in finery, to devolve into barbarism? Now that Goryeo's envoys have gone to see the Turks and have been seen by Qimin Khan, the entire nation is aligning with the Turks; they will definitely fear the majesty of the emperor and worry about being destroyed in the future. If we employ certain strategies to compel them to pay tribute, we can certainly succeed."
The emperor asked, "What should we do about this?" Yang Ju said, "Please rebuke their envoy in person, then send them back to their country, and send someone to inform the King of Goryeo to come to court promptly. If they do not listen, then mobilize troops and ally with the Turks to swiftly eliminate them!" The emperor accepted his suggestion. Since the King of Goryeo did not listen, the campaign to conquer Goryeo commenced. The emperor led troops to attack Goryeo, and Yang Ju held his original official position while also serving as the military commander. The following year, he followed the emperor to Liaodong. The Minister of War, Husi Zheng, defected to Goryeo, and the emperor appointed Yang Ju to take charge of the military. Due to his participation in two battles crossing the Liao River, Yang Ju was promoted and became the Right Minister of Rites.
At that time, the court's rules and regulations were in decline, and many people were defecting. The Grand General of the Left Yuyiwei, Yu Wenshu, and the Minister of the Interior, Yu Shiji, held power, and civil and military officials relied on bribery for promotion. Only Yang Ju adhered to principles, was honest and principled, with no rumors of corruption or bribery, and thus received praise from the people.
When I arrived at Zhuojun, the emperor had just heard that Yang Xuan had been pacified, so he sent me to the Longyou area to pacify the people and restore order. When I arrived at Huining, I went to visit the Hesana tribe and also sent people to attack the Tuyuhun, achieving successive victories and capturing numerous prisoners, leading to the tribe's prosperity. After returning to the court, I reported the situation to the emperor, who graciously rewarded me.
Later, I followed the army to Huaiyuan Town, and the emperor put me in charge of military affairs along the northern border. I found that Khan Shibei's power was growing stronger, so I suggested that we weaken his power by marrying the royal princess to his brother, Chijishe, and appointing him as the Khan of the Southern Front. Chijishe was hesitant to accept this title, and Khan Shibei gradually became dissatisfied upon hearing about it. I then said to the emperor, "The Turks are generally simple and easily manipulated. It's just that there are many cunning individuals from other tribes within their ranks. If we sow discord among them, we can achieve our goal. I heard that Huxi is particularly cunning and trusted by Khan Shibei. We can use him." I suggested, "We could lure him into a trap and kill him." The emperor said, "Good idea!"
So, I sent someone to inform Huxi, "The emperor has brought many treasures and is now in Mayi, wanting to trade with your border tribes. If you come, you will get many good things." Greedy and naïve, Huxi failed to inform Khan Shibei. He led his tribe, driving all their livestock and hurrying to Mayi to trade. I had already set up an ambush in Mayi, lured him in, and then killed him. We then sent a decree to Khan Shibei, saying, "Huxi suddenly brought his tribe here, claiming he would betray you and asking for our protection. Since the Turks are my subjects, if he dares to betray us, I will certainly kill him. Now I have killed him and sent someone to inform you." Khan Shibei realized what had happened and never paid tribute again.
In the eleventh year of his reign, the emperor went to the north for inspection, and Khagan Shibi led hundreds of thousands of cavalry to surround the emperor in Yanmen. The emperor ordered me and Yu Shiji to be on duty in the court every night, ready to respond to the emperor's inquiries at any moment. Once the siege was lifted, I followed the emperor to the eastern capital. Coincidentally, Khagan Shibi sent his son with representatives from various western tribes to pay tribute. The emperor tasked me with hosting them.
I followed the emperor to the Jiangdu Palace. At that time, banditry and uprisings were rampant across the regions, and reports from various counties were countless. I reported some situations, which displeased the emperor. He sent me to the capital to welcome foreign envoys, but I feigned illness and did not attend. Later, the rebel army invaded Guanzhong, and the emperor sent Yu Shiji to my house to ask for my strategy. I said, "There is chaos in Taiyuan, and the capital region is also unstable. Issuing orders from such a distance may miss the opportunity. It is best for the emperor to return to the capital quickly to pacify the world." I resumed my work.
Not long after, news of the defeat of the valiant general Qu Tutong came, and I quickly reported it to the emperor, whose face changed. I usually work diligently and cautiously, never contradicting anyone. Seeing the chaos in the world, I was worried for my own safety, so I treated others exceptionally well, often exceeding their expectations, which made even the most ordinary servants satisfied with me. Many of the elite soldiers who accompanied the emperor had deserted, and the emperor was deeply concerned and asked me what to do. I replied, "The emperor has been here for two years now. Most of these elite soldiers have no families, so of course they can't stay here alone. I suggest allowing them to settle down here." The emperor was delighted and remarked, "You are truly clever and have devised an excellent solution!" So he entrusted me with the task of arranging marriages for the soldiers.
I gathered all the widows and unmarried women in Jiangdu and brought them to the palace, letting the generals and soldiers choose from among them. I also allowed them to surrender themselves, and soldiers who had committed adultery, as well as nuns and Taoist priests, were all matched with partners. As a result, the elite soldiers were quite pleased, saying to each other, "This is the blessing of Lord Pei!"
It is said that one morning, when Pei Ju got up to go to court, he walked to the neighborhood gate and met several rebels who forcibly took Pei Ju's horse to Meng Jing's place. The rebels shouted, "It has nothing to do with Lord Pei!" Soon after, Yuwen Huaji arrived with more than a hundred cavalry; Pei Ju hurriedly bowed respectfully, and Yuwen Huaji comforted him. Then he involved Pei Ju in drafting some rituals and protocols, elevated Prince Hao of Qin to the throne, and appointed Pei Ju as an attendant, accompanying Yuwen Huaji to Hebei. After Yuwen Huaji became emperor, he appointed Pei Ju as the Right Minister of Personnel, added the title of Doctor of Guanglu, appointed him as Duke of Cai, and designated him as the Ambassador for Pacification of Hebei.
Later, Yuwen Huaji met with defeat and was captured by Dou Jiande. Dou Jiande knew that Pei Ju was an old official of the Sui Dynasty and treated him with particular favor. He appointed him as the Minister of Personnel Affairs and shortly after promoted him to the Minister of the Right of the Imperial Secretariat, specifically tasked with selecting officials. Dou Jiande, having risen from banditry, lacked knowledge of court etiquette, so Pei Ju assisted him in establishing court rituals. Before long, the court's rules and regulations were almost complete, giving the appearance of a legitimate emperor. Dou Jiande was extremely pleased and sought Pei Ju's advice on various matters. Later, Dou Jiande crossed the Yellow River to fight Meng Haigong, while Pei Ju, Cao Dan, and others stayed in Mingzhou to defend the city. Consequently, Dou Jiande suffered defeat at the Battle of Wulao. Everyone was at a loss as to what to do, and Cao Dan's Chief of Staff Li Gongyan, the Tang envoy Wei Zheng, and others advised Cao Dan and Qi Shanxing to surrender to the Tang Dynasty. Cao Dan consented, allowing Pei Ju, Wei Zheng, and Li Gongyan to take him and eight seals to surrender the territory of Shandong to the Tang Dynasty. The Tang court appointed Pei Ju as the Left Imperial Secretary, later promoting him to Chancellor and Minister of Civil Affairs.
In historical records, it is said that Pei Ju was known for his integrity and detachment from a young age, as well as for his outstanding literary talent. After the downfall of the country, he wandered around but was still found favor. He held important positions, participated in the planning of military and national affairs, and never thought of saving himself in times of national crisis; even when the emperor was incompetent, he was unable to offer counsel. He even sold positions and exploited his authority, his insatiable greed led him to ruin his reputation, which ultimately led to his own downfall. Pei Yun, on the other hand, was intrinsically cunning and deceitful, adept at flattery, and solely focused on his own interests. Could he have escaped the disaster that befell the nation? Pei Ju was knowledgeable, talented, diligent and tirelessly devoted to public service, a truly commendable trait among ancient people. He participated in political affairs for many years, maintaining honesty and prudence even in times of crisis, which was truly commendable. However, his alignment with the wishes of those in power and the prevailing circumstances led to the submission of Gaochang and the surrender of Yiwu, the hoarding of food in Qumul, and the troops' deployment from Yumen Pass, which instilled fear among the people of the Guanzhong region, all of which were at least partially connected to Pei Ju.