Xuanwu Gate Incident

After Li Yuan established the Tang Dynasty, he appointed his eldest son, Li Jiancheng, as the Crown Prince and his second son, Li Shimin, as the Prince of Qin. According to the feudal patriarchal system, Li Jiancheng, as Li Yuan's eldest son, was naturally entitled to be the Crown Prince. However, Li Shimin was both intelligent and brave; he first persuaded Li Yuan to rebel against the Sui Dynasty and later fought in numerous battles, making significant contributions to the Tang Dynasty, earning him far greater prestige than the Crown Prince Li Jiancheng. Additionally, Li Shimin was appointed by Li Yuan as the "Heavenly Strategy General," the Grand Administrator of the Shandong Circuit, the Director of the Department of State Affairs, and the Minister of Education. Believing himself to be exceptionally talented and distinguished in military achievements, Li Shimin established a Literature Hall in the Prince of Qin's residence, recruiting talented individuals from across the realm as his advisors. Seeing Li Shimin's growing influence, Crown Prince Li Jiancheng began to worry that his position might be replaced by Li Shimin, leaving him constantly uneasy. To secure his status and eventually inherit the throne to become the sovereign, Li Jiancheng allied with the Prince of Qi, Li Yuanji, to oppose Li Shimin.

Li Jiancheng frequently curried favor with some of Li Yuan's favored consorts, building close relationships with them. Li Shimin, often absent from the capital, did not do this. After Li Shimin pacified Luoyang, a consort approached him, hoping he would appoint her relative to an official post or grant her some treasures from the Sui palace. Li Shimin refused her request. Consequently, the harem consorts often spoke ill of Li Shimin and praised Li Jiancheng in front of Li Yuan.

Li Jiancheng's faction viewed Li Shimin as a thorn in their side and constantly sought to eliminate him. One night, Li Jiancheng prepared a lavish banquet and invited Li Shimin to join him. However, poison had been placed in the wine, and Li Shimin, unsuspecting, raised his cup and drank it all. Shortly after, Li Shimin felt unbearable abdominal pain and vomited a great deal of blood. Fortunately, Prince Li Shentong of Huai'an escorted him back to the Western Palace and promptly summoned a physician for treatment, which saved Li Shimin from being poisoned to death.

After learning that Li Shimin had been poisoned, Li Yuan went to the Western Palace to visit him. Li Yuan said to Li Jiancheng, "The Prince of Qin has a limited capacity for alcohol; in the future, do not gather for drinks with him at night." He then said to Li Shimin, "From the time I raised the army in Jinyang to pacify the realm and become the sovereign, all of this has been your achievement. I originally intended to make you the crown prince, but you firmly refused, so I made Jiancheng the heir. Jiancheng has been the crown prince for a long time now, and since he has committed no serious offenses, I cannot depose him. I see that although you are brothers, you cannot tolerate each other. If you both remain in Chang'an, your conflict will only deepen day by day. I do not wish to see brothers killing each other. It would be better for you to go to Luoyang, and I will grant you all the lands east of Shaanxi." Upon hearing this, Li Shimin wept and said, "This is not my wish; I hope to stay by your side and serve you." Li Yuan replied, "All under heaven belongs to me. If you go to Luoyang, I can visit you there whenever I miss you—how is that different from staying by my side?" Li Shimin had no response and could only obey Li Yuan's orders. When Li Jiancheng learned of this, he discussed it with his subordinates, saying, "If Li Shimin gains land and troops, he will pose an even greater threat to me. If he remains in the capital, he will be powerless." So he sent someone to tell Li Yuan, "All of Li Shimin's generals are from Shandong. When they heard they were going to Luoyang, they were overjoyed. Judging by their demeanor, it seems they never intend to return." Upon hearing this, Li Yuan canceled the order for Li Shimin to go to Luoyang.

Xuanwu Gate Incident
Xuanwu Gate Mural

Li Jiancheng and Li Yuanji, seeing that they could not eliminate Li Shimin, changed their strategy and attempted to win over the fierce generals around Li Shimin to their side. Li Jiancheng secretly sent Yu Chigong a cartload of gold, silver, and treasures along with a letter, hoping to befriend him. However, Yu Chigong, who was utterly loyal to Li Shimin, told Li Jiancheng's envoy, "I am a man of the Prince of Qin's household. If I were to secretly associate with the Crown Prince, how could I face the Prince of Qin? I doubt the Crown Prince would want such an ungrateful and treacherous person either." After saying this, he had the envoy take away the entire cart of treasures.

Li Jiancheng was very angry and sent an assassin to Yuchi Gong's home that night. Yuchi Gong had already prepared defenses, so the assassin failed.

Li Jiancheng and Li Yuanji did not stop there. At that time, the Turks were attacking the Central Plains. Crown Prince Li Jiancheng proposed that Li Yuanji serve as the supreme commander to lead the army north to resist the Turks, and Li Yuan agreed to Li Jiancheng's suggestion. Li Yuanji requested that Li Yuan order the three great generals under Li Shimin—Yuchi Gong, Qin Shubao, and Cheng Zhijie—along with all the elite troops of the Prince of Qin's residence, to be placed under his command. Li Yuanji's intention was not to use these troops against the Turks, but to take them away from Li Shimin and then eliminate him.

Li Shimin saw through the conspiracy of Li Jiancheng and Li Yuanji and quickly summoned Zhangsun Wuji, Yuchi Gong, and others to discuss countermeasures. Both Zhangsun Wuji and Yuchi Gong believed that Li Shimin should strike first. However, Li Shimin said, "Fratricide among brothers is ultimately a disgraceful matter. If they do not make a move, I cannot act first either."

Yuchi Gong said angrily to Li Shimin, "If you still refuse to act, then I beg you to let me leave the Prince of Qin's residence. I have no desire to stay here and wait to die for nothing!"

Zhangsun Wuji said, "Prince of Qin, you have repeatedly tolerated them. Since they have been unkind, how can they blame you for being unrighteous? In my opinion, you should strike early and eliminate them before they harm you further."

Seeing that his soldiers were all resolute, Li Shimin made up his mind to eliminate Li Jiancheng and Li Yuanji.

Li Shimin went to see Li Yuan and reported that Li Jiancheng and Li Yuanji were committing adultery within the imperial harem. Shocked by this news, Li Yuan decided to summon Li Jiancheng and Li Yuanji to the palace the next day to get to the bottom of the matter. Li Shimin, along with Yuchi Gong and others, led their troops to ambush in advance at the Xuanwu Gate, the northern gate of the palace city, which was the only route Li Jiancheng and his brother had to take to enter the palace. As Li Jiancheng and Li Yuanji rode their horses toward Xuanwu Gate, the commander of the imperial guards responsible for defending the gate, Chang He, who was originally Li Jiancheng's man, had already been bribed by Li Shimin beforehand. Not seeing Chang He and noticing that the guards on duty were unfamiliar faces, Li Jiancheng sensed danger and quickly turned his horse to flee. Seeing this, Li Yuanji followed suit. Li Shimin then led his ambushing troops to charge out from hiding. In the face of imminent danger, Li Yuanji drew his bow and shot three arrows at Li Shimin, but due to his panic, none of them hit their target. Spotting Li Jiancheng about to escape, Li Shimin shot an arrow, killing him instantly. Yuchi Gong and dozens of cavalrymen arrived on the scene; Li Yuanji was struck by an arrow and fell from his horse. Quick-witted and swift, Yuchi Gong swung his blade and cut Li Yuanji down.

After receiving the news, the generals of the Crown Prince's mansion immediately rushed to avenge Li Jiancheng and engaged in a fierce battle with Li Shimin's troops outside the Xuanwu Gate. Yuchi Gong cut off the heads of Li Jiancheng and Li Yuanji and said to Li Jiancheng's men, "The Crown Prince is dead. If you do not surrender, you will suffer the same fate." Only then did Li Jiancheng's soldiers and officers disperse.

After this incident was settled, Li Shimin sent Yuchi Gong to meet Li Yuan and recount the entire sequence of events. Li Yuan was both shocked and deeply grieved, but since Li Jiancheng and Li Yuanji were already dead, he had no choice but to appoint Li Shimin as the crown prince. Two months later, Li Yuan abdicated the throne to Li Shimin and retired to become the Grand Emperor.

Li Shimin was Emperor Taizong of the Tang Dynasty. After ascending the throne, he implemented policies to reduce extravagance and spending, lighten corvée labor and taxes, reclaim wasteland, and vigorously build water conservancy projects, which significantly improved the people's lives and restored social production. Additionally, Li Shimin reformed the military garrison system, strengthened border defenses, and sent generals to defeat the Eastern Turks, completely resolving the border threat. Through a series of effective reforms by Li Shimin, Tang society flourished with a thriving and prosperous scene.