Xue Rengui (Suringi) (; 614Xue Rengui's biography in Old Book of Tang indicated that he was 70 (by East Asian reckoning) when he died. () Jiu Tang Shu, vol.83. Thus by calculation, his birth year should be 614. – 24 March 683jimao day of the 2nd month of the 2nd year of the Yongchun era, per vol. 5 of Old Book of Tang), formal name Xue Li () but went by the courtesy name of Rengui, was a Chinese military general during the early Tang dynasty. He is one of the most well-known military generals of his time due to his humble background, outstanding command abilities, strength and valour in battle. During his career, he participated in successful campaigns against remnants of Western Tujue and against Goguryeo, with only one major flaw on his record which was a campaign against the Tibetan Empire in 670, where another general in his army refused to listen to Xue's order, caused a portion of the army to be lost.
During Emperor Taizong's reign Xue Rengui was born in 614, during the reign of Emperor Yang of Sui, but his early activities were not recorded, other than that his wife had the surname Liu (). It was said that he was poor and was a farmer. Around the time that Tang dynasty's second emperor Emperor Taizong was set to launch a major campaign against Goguryeo in 644, Xue was planning to rebury his ancestors, when Lady Liu told him:(”) Xin Tang Shu, vol.111
Xue thus went to meet the general Zhang Shigui () to volunteer for the army. Once he reached the front, on an occasion when the general Liu Jun'ang () was being surrounded by Goguryeo forces, Xue went to rescue Liu, and he was able to kill the Goguryeo commander and hang the Goguryeo commander's head on his saddle; after this incident, he began to gain fame and was promoted to become an officer. When Emperor Taizong was ready to attack the Goguryeo city of Ansi (, in modern Anshan, Liaoning) in 645 and was faced with a major relief army sent by Goguryeo's Dae Mangniji (regent) Yŏn Kaesomun, commanded by the generals Ko Yŏnsu () and Ko Hyejin (), Emperor Taizong had his officers try to repel the Goguryeo forces. Xue, despite his low military rank, believing himself to be powerful and wanting to show his ferocity, decided to lead the charge. He put on a white armor and armed himself with a Ji and two bows, roaring fiercely and charging into the enemy forces, and no one from the Goguryeo army could stop him, the rest of Tang officers then followed and charged into the enemy line as well. As Xue fought his way through the frontlines against the overwhelming numbers of enemy forces, he inflicted much casualties on the Gogureyo soldiers. Taizong personally led 4,000 elite soldiers into the battle as well, the Goguryeo army's formation was broken, at least 20,000 Goguryeo soldiers were killed and 36,800 soldiers including their generals Ko Yŏnsu and Ko Hyejin, surrendered. In the midst of battle Emperor Taizong spotted Xue from a distance and asked his attendants, "Who is that man in white armor?" and was told it was Xue. Emperor Taizong summoned Xue to his presence and awarded him with gold and silk and also gave him a general title. After Emperor Taizong retreated later in the year, he told Xue:
Emperor Taizong made Xue one of the commanding generals for the imperial guards.
During Emperor Gaozong's reign After Emperor Taizong's death in 649, his son Li Zhi succeeded him (as Emperor Gaozong), and for the first few years of Emperor Gaozong's reign, Xue Rengui appeared to remain a commanding general for the imperial guards. In 654, when Emperor Gaozong was visiting the vacation palace Wannian Palace (, in modern Baoji, Shaanxi), there was a major storm. On the night of June 22, it rained particularly hard, and a flash flood descended on the Xuanwu Gate of Wannian Palace. The imperial guards all fled, but Xue did not, and instead climbed up the gate and yelled loudly inside the palace to warn the emperor. Emperor Gaozong quickly got out of his bed and climbed as high as he could, and in brief time, the water flooded into his bedchambers, and this flood killed some 3,000 residents of Linyou County, where the palace was located, and imperial guards. Afterwards, Emperor Gaozong made the comment to Xue, "It is only by your call that I avoided drowning, and from this I know that you are a faithful subject." He awarded Xue a horse.
In 657, when the general Su Dingfang attacked Western Turkic Khaganate's Shaboluo Khan Ashina Helu (), Xue submitted a suggestion that if the wife and children of the chief of one of Western Turkic Khaganate's constituent tribes, Nishu Tribe (), who did not particularly support Ashina Helu but was forced to comply after Ashina Helu took his wife and children hostage, were to be captured by Tang forces, that they be immediately released so that the chief of Nishu would submit to Tang. When Emperor Gaozong approved this suggestion, the chief of Nishu did, indeed, join Tang's army. Su was subsequently able to defeat and capture Ashina Helu.
Later that year, Xue was made deputy to the general Cheng Mingzhen () in an operation against Goguryeo, and they captured Goguryeo's city Chifeng (, in modern Fushun, Liaoning) and defeated the Goguryeo general Du Bangnu (). In 659, Xue personally led a surprise cavalry charge to attack the Goguryeo formation under the command of Goguryeo general Wen Shamen () and defeated him, single-handedly killing dozens of enemy soldiers in the battle. He also engaged Qidan forces, capturing their chief Abugu () and taking him back to the eastern capital Luoyang. For this achievement, he was created the Baron of Hedong.
In 661, after the chief of Tang's vassal Huige, Yaoluoge Porun () died and was succeeded by his nephew Yaoluoge Bisudu (), Yaoluoge Bisudu broke away from Tang and allied with two other tribes, Tongluo () and Pugu () in attacking Tang's northern boundary. Emperor Gaozong commissioned the general Zheng Rentai () to be in charge of an operation against Huige, while making the Xue and Liu Shenli () Zheng's deputies. When they encountered Huige's coalition forces—which by this point appeared to include all nine major tribes of Tiele—the coalition challenged Tang forces to a small battle, with Tiele sending out their 10 fiercest warriors. Xue personally engaged them and killed three of them with three arrows, intimidating the Tiele coalition and causing them to submit—but after their surrender, he ordered to kill all the ten and several thousands people. From this incident, a military song was written to praise Xue's ferocity, including the words: "The general is able to pacify Tian Shan with three arrows, and the warriors sing their long songs as they enter the boundaries of Han." After the army returned to Tang territory, however, Xue was charged with killing those who had already surrendered and seizing the spoils of war and arrested for a time, but was eventually released after Emperor Gaozong ruled that the achievements outweighed the crimes.
In 666, Yŏn Kaesomun died, and infighting developed between Yŏn's oldest son Yŏn Namsaeng, who succeeded Yŏn Kaesomun as Dae Mangniji, and two younger sons Yŏn Namgŏn and Yŏn Namsan, over suspicions that they had for each other. Eventually, Yŏn Namgŏn, while Yŏn Namsaeng was away from the capital Pyongyang, claimed the Dae Mangniji title himself. Yŏn Namsaeng sent his son (later known as Ch'ŏn Hŏnsŏng/Quan Xiancheng (), as Yŏn () was the same character as Emperor Gaozong's grandfather Emperor Gaozu's name Yuan and therefore could not be used due to naming taboo) to seek aid from Tang. When Emperor Gaozong sent the generals Pang Tongshan () and Gao Kan () to aid Yŏn Namsaeng, Yŏn Namgŏn tried to intercept them, and Xue, who trailed them, marched forward to aid them, allowing them to defeat Goguryeo forces together. After they captured the cities of Namso (, in modern Tieling, Liaoning), Mokjeo (, in modern Fushun), and Changam (, in modern Benxi, Liaoning), they were able to rendezvous with Yŏn Namsaeng. In spring 668, they further marched east and captured Goguryeo's major northeastern city Buyeo (, in modern Siping, Jilin), and Xue was described to have marched to the sea (probably Sea of Japan) and taking some 40 cities in Goguryeo's northeastern territories, before marching southwest to rendezvous with the supreme commander of the entire operation, Li Ji, at Pyongyang. After Pyongyang fell later in 668, thus ending Goguryeo, Emperor Gaozong ordered that Goguryeo territory be annexed into Tang territory and that a protector general (known as the Protectorate General to Pacify the East) by established at Pyongyang, with Xue appointed as the protector general to defend Pyongyang, along with the general Liu Rengui. Emperor Gaozong created him the Duke of Pingyang. It was said that Xue was a capable administrator and was, for a while, able to receive allegiance from the people of Goguryeo.
In 670, Tibetan Empire launched a major attack with 400,000 men on Tang's Anxi Protectorate and captured 18 prefectures. Emperor Gaozong commissioned Xue to command a counterattack, with Ashina Daozhen (), and Guo Daifeng (), the son of Tang's veteran general Guo Xiaoke (), as his deputies. However, as Guo had been of the same rank as Xue, he viewed serving as Xue's deputy as a dishonor and often disobeyed Xue's orders. Xue's initial strategy was to take some troops ahead toward, with Guo remaining behind at Qinghai Lake with the military supplies—and once Xue had cleared the pass, he would then signal for Guo to proceed. Guo, however, disobeyed the order and did not wait for Xue's signal, but proceeded after Xue departed, and he was intercepted and defeated by a 200,000-men Tibetan army. After Guo's army collapsed, Xue was himself attacked by the Tibetan prime minister Gar Trinring Tsendro ("Lun Qinling" () in Chinese) at the Dafeichuan. Although Xue inflicted heavy loses on the Tibetans, his forces retreated from the Dafei River. Emperor Gaozong sent the official Le Yanwei to the front to put Xue, Guo, and Ashina under arrest, but released them once they were brought back to the capital Chang'an. However, they were relieved of their posts.
At later time, when the people of Goguryeo were rising in resistance to Tang occupation, Xue was put in charge of pacifying the region, but yet later, probably in 675, Xue was deposed for reasons not clearly stated in historical records and exiled to Xiang Prefecture (, roughly modern Laibin, Guangxi), only allowed to return from exile when a general pardon was declared. In 681, Emperor Gaozong, remembering Xue's contributions, summoned him and again made him a general. In 682, when remnants of the Eastern Tujue, rising under the chiefs Ashina Gudulu and Ashide Yuanzhen (), declared independence from Tang, Xue was commissioned to attack Ashide Yuanzhen. His presence intimidated the Eastern Tujue soldiers, who had thought that he was long dead, and he scored a major victory over Ashide Yuanzhen.
Xue died in March 683. His sons Xue Ne and Xue Chuyu (), and several later descendants would serve as generals as well.
In fiction Xue Rengui's life was dramatized in a number of fictional works. The most prominent of these works were the play Xue Rengui's Glorious Return Home (), by the Yuan dynasty playwright Zhang Guobin () and an anonymous novel from Qing dynasty, Xue Rengui's Campaign to the East ().
His tenure as General of Andong Protectorate following the fall of Goguryeo has been dramatized in a popular Korean television series called Dae Jo-yeong, and portrays Xue Rengui as a Tang general who is constantly frustrated by the insurgency of the Dongmyeongchun League; remnants of the Goguryeo underground resistance against the Tang.