Turks were once a stubborn disease of the Sui and Tang dynasties, and just as the Xiongnu threatened the Han Dynasty, the Turks were once a sword on the head of the Li Tang Dynasty. When the Tang Dynasty was first established, in order to complete the unification of the country, it could only humbly seek peace with the Turks to stabilize the rear. But the greedy Turks were always thinking of getting more out of the Tang Dynasty, and the two regimes began to fight for decades.

As early as the Sui Dynasty, the Turks were a great threat to the Sui Dynasty. In 583, under the divisive measures of Emperor Wen of Sui, the Turks were divided into two states: the Eastern Turks and the Western Turks. At the end of the Sui Dynasty and the beginning of the Tang Dynasty, the Eastern Turks became the greatest external threat to the nascent Tang Dynasty. On the fourth day of June in the ninth year of WuDe, a coup d'état at Xuanwumen occurred. In the seventh month of the first month, Li Yuan made Li Shimin the Prince of Qin crown prince, and issued an edict that all state affairs were handled by the crown prince Li Shimin. The turmoil within the Tang Dynasty made the Eastern Turks believe that this was the best time to eliminate the Tang Dynasty.
So on June 15 of that year, the Eastern Turks sent troops to Weizhou, and the Tang Dynasty sent the Right Guard general Chai Shao to meet it. On the third day of the first month of July, Chai Shao broke the Turkic soldiers in Qinzhou, beheaded one of Teller and killed more than 1,000 Turkic soldiers. The defeat on the battlefield forced the Eastern Turks to send envoys to seek peace.
On August 8, Li Yuan abdicated, and Li Shimin was enthroned as the new emperor of the Tang Dynasty. At the beginning of Li Shimin's reign, internal stability was not yet stable, the remnants of Li Jiancheng and Li Yuanji were still stirring, the people in the entire Guanzhong region were panicked, and there were many factors of social instability. At this time, the Eastern Turks still had a large number of troops stationed in Longzhou, Weizhou, Qinzhou and other places. Li Shimin's succession allowed Jieli Khan and Tuli Khan to see the opportunity to attack Tang again. They encouraged the soldiers on the grounds that Tang "had difficulties in the country, and the new one was on the throne", and led more than 100,000 troops straight to Jingzhou. Li Yi (Luo Yi), the general of Zhenshoujing Prefecture (Zhenshoujing Prefecture), was a princeling (Li Jiancheng's faction), and Li Yi disregarded the security of the country and only cared about personal hatred, and even let the Eastern Turks pass through his defense zone.
Soon, the Eastern Turks divided their troops into three routes and attacked Tang with all their might. The right flank of the Turkic army attacked Wugong, the left wing marched on Gaoling, and Jieli Khan led the main chinese army south, and the troops pointed directly at Chang'an. On June 20, the Turkic right wing arrived at Wugong; on the 24th, the left wing reached Gaoling. Emperor Taizong hurriedly dispatched his confidant general Chi Jingde (敬德) to serve as the commander-in-chief of the Jingzhou Road March to block the Turkic left-wing army. Two days later, Wei Chi Jingde broke the Turkic left wing army in Jingyang, captured The Jin Ash de Wu and killed more than 1,000 enemy people. However, the Tang army blocked the victory of the Turkic left army and failed to prevent the main force of Jieli Khan from rapidly moving south. On the twenty-eighth day, Jieli Khan and Tuli Khan had already led a large army to the north bank of the Weishui Ben Bridge.
The enemy country has reached the weishui river, and Li Shimin is facing the situation of Liu Bangbai's mountaineering siege. At this time, Chang'an City only had tens of thousands of troops. The soldiers of the Qin King in various places have not yet arrived, and the troops of the two sides are very different. Coupled with the fact that Emperor Taizong had just ascended the throne, the country was not yet stable, and there were still many contradictions within the ruling clique, and if there was a war with the Turks at this time, the situation might be difficult to control. As a famous general in the early Tang Dynasty, Li Jing proposed to Li Shimin: "Please pour the treasury of the palace to seek peace", and avoid fighting in Chang'an by seeking peace, so as to ensure the safety of Chang'an.
Choosing peace talks, Li Shimin began to create momentum for peace talks. He first made a defensive deployment of Chang'an. Then arrange for Li Jing to lead his troops from Lingzhou to travel day and night, cutting off the Retreat Route of the Turks and putting pressure on the Turks. This was followed by the establishment of suspicious troops to confuse the Uninformed Turkic army, and at the same time to make tens of thousands of residents in Chang'an City temporarily armed and make a look of a decisive battle with the Turks.
After making preparations before the negotiations, Tang Taizong did not hesitate to lead his loyal servants Gao Shilian, Zhongshu LingFang Xuanling, general Zhou Fan and other six horsemen to the south bank of Weishui to negotiate with Jieli Khan. On the south bank of the Weishui River, Tang Taizong loudly accused the Turks of not abiding by the covenant. Accompanied by Emperor Taizong's rebuke, the dust deliberately created by the suspects behind him when they assembled. After the dust settled, in the depths of Tang Taizong, the large army of those people Qiao Zhuang was gathered, and at this moment, the army was neat and tidy, and the flags were everywhere. The Unexplained Jieli Khan mistakenly thought that the Tang army had come prepared, and it was inevitable that he would be timid.
Subsequently, Tang Taizong began his soft and hard negotiations, in order to withdraw the troops of the Eastern Turks, he did not hesitate to promise to give the Eastern Turks a large amount of money and gold to meet the purpose of their plunder. Jieli Khan knew that he was wrong, and was shocked by the military appearance of the Tang army, and at this time, the Qin king's troops everywhere were rushing in the direction of Chang'an, and the most important thing was that Li Jing had already led his troops to Youzhou to block the Retreat of the Turks.
Under various unfavorable factors, Jieli Khan abandoned his plan to attack Chang'an and requested an alliance with Tang Taizong. Two days later, on the thirtieth day, Emperor Taizong and Jieli Khan came to the west of the city and beheaded Baima and Jieli to make an alliance of blood on the ben bridge. Even so, when the Turkic soldiers withdrew their troops, they did not forget to plunder the occupied Tang lands.
Although Tang Taizong defused the crisis with his political wisdom and boldness, he was very annoyed by the humiliation of the alliance under the city this time, whether in the founding campaign, the war of unification, or in the previous wars with the Turks. Tang Taizong then called the alliance "the shame of Weishui". After experiencing the "shame of Weishui", Tang Taizong tried his best to rule, and finally destroyed the Eastern Turks.