Emperor Gaozu establishes Tang, appointing Li Jiancheng as Crown Prince and Li Shimin as Prince of Qin
· HISTORICAL EVENT
Incident at Xuanwu Gate (玄武门之变)
玄武门之变
The Incident at Xuanwu Gate (玄武门之变) was a pivotal palace coup orchestrated by Li Shimin, Prince of Qin, at the northern gate of Taiji Palace in the Tang capital Chang'an on July 2, 626. During the founding campaigns of the Tang dynasty, Li Shimin commanded the campaigns that crushed principal rivals, including Xue Rengao, Song Jingang, Liu Wuzhou, Dou Jiande, and Wang Shichong. Bestowed with the unique title of Grand General of Heavenly Strategy, Li…

OVERVIEW
The Incident at Xuanwu Gate (玄武门之变) was a pivotal palace coup orchestrated by Li Shimin, Prince of Qin, at the northern gate of Taiji Palace in the Tang capital Chang'an on July 2, 626. During the founding campaigns of the Tang dynasty, Li Shimin commanded the campaigns that crushed principal rivals, including Xue Rengao, Song Jingang, Liu Wuzhou, Dou Jiande, and Wang Shichong. Bestowed with the unique title of Grand General of Heavenly Strategy, Li Shimin established an autonomous administrative agency and literary salon that rivaled the formal imperial court. Alarmed by his brother's towering military aura, Crown Prince Li Jiancheng allied with Li Yuanji, Prince of Qi, to curb Li Shimin's authority through political maneuvering, palace intrigue, and troop realignments. In the summer of 626, facing imminent assassination and the dispersal of his core commanders under the pretext of a northern expedition against the Turks, Li Shimin resolved to strike preemptively. Suborning the palace gate garrison commanders, Li Shimin ambushed the crown prince and Prince of Qi as they entered the palace, personally shooting Li Jiancheng while his trusted general Yuchi Jingde dispatched Li Yuanji. Imperial guards secured Emperor Gaozu on the palace pleasure lake, transferring supreme command to Li Shimin. Recognized as crown prince and ascending the throne two months later as Emperor Taizong, Li Shimin inaugurated the renowned Reign of Zhenguan.
EVENT TIMELINE
Li Shimin defeats Wang Shichong and Dou Jiande, gaining permission to establish an autonomous staff bureau
Rebellion in Qingzhou exposes arms smuggling; imperial succession promises are rescinded, worsening rivalry
Li Shimin denounces the crown prince for palace treason; gatekeeper Chang He is suborned to open the gates
Li Shimin slays Li Jiancheng; Yuchi Jingde kills Li Yuanji and secures Emperor Gaozu on the imperial lake
Emperor Gaozu decrees that all state and military decisions be submitted directly to Li Shimin
Emperor Gaozu abdicates as Retired Emperor; Li Shimin ascends the throne, launching the Zhenguan era
Relationship graph
FULL ACCOUNT
Event Information
Event Name: Incident at Xuanwu Gate (玄武门之变); Alternative Name: Xuanwu Gate Incident, Xuanwu Gate Coup (玄武门事变), Tang Dynasty Palace Coup of Wude (唐武德宫廷政变); Event Type: Palace Succession Coup (宫廷权力更迭政变); Dynasty: Tang (唐代); Location: Xuanwu Gate and Lake Linhu of Taiji Palace, Chang'an; Time Period: July 2, 626 (Fourth Day of the Sixth Month of Wude 9) - September 4, 626 (Ninth Day of the Eighth Month of Wude 9); Parties Involved: Prince of Qin Faction (Li Shimin, Zhangsun Wuji, Yuchi Jingde, Fang Xuanling, Du Ruhui), Crown Prince Faction (Li Jiancheng, Li Yuanji, Xue Wanche, Feng Li), Court of Emperor Gaozu; Key Figures: Emperor Gaozu of Tang, Li Jiancheng, Li Shimin, Li Yuanji, Yuchi Jingde, Zhangsun Wuji, Fang Xuanling; Cause: Monumental military prestige of Li Shimin prompting Crown Prince Li Jiancheng and Li Yuanji to conspire to eliminate him to protect the imperial succession; Outcome: Li Shimin ambushed and killed Li Jiancheng and Li Yuanji at Xuanwu Gate, seized control of the guards, forced Gaozu's abdication, and ascended the throne; Impact: Ended violent succession strife, stabilized the sovereign center of the young Tang empire, and inaugurated the celebrated Reign of Zhenguan;
Historical Background
Monumental Military Glory and the Heavenly Strategy Bureau
During the unification wars of the early Tang dynasty, Li Shimin functioned as supreme field marshal for the empire's most critical operations. Following his triumphs at Shallow Water Slope, the crushing of Song Jingang, and his legendary victory at Hulao Pass where he captured Dou Jiande and coerced Wang Shichong's surrender, Emperor Gaozu honored Li Shimin with the unprecedented title Grand General of Heavenly Strategy. Allowed to appoint personal civil and military subordinates, Li Shimin established the Literary Academy, recruiting celebrated luminaries known as the Eighteen Scholars, including Fang Xuanling, Du Ruhui, and Yu Shinan. Backed by elite military veterans such as Yuchi Jingde, Qin Shubao, and Cheng Yaojin, the Prince of Qin's mansion emerged as a formidable military and administrative counter-weight to the legitimate heir apparent.
The Alliance of Jiancheng and Yuanji
Recognizing that Li Shimin's military prestige directly imperiled his dynastic succession, Crown Prince Li Jiancheng sought to fortify his political position. As administrator of the capital, Li Jiancheng governed civil affairs skillfully and directed the final pacification of Liu Heita in Shandong with the counsel of Wei Zheng and Wang Gui. To match Li Shimin's armed forces, Li Jiancheng enlisted thousands of private warriors known as the Changlin Guards and recruited elite Youzhou cavalry from General Li Yi. Concurrently, Li Jiancheng forged an alliance with his combative younger brother Li Yuanji, courting favor among Emperor Gaozu's influential concubines, Consort Zhang and Consort Yin, who systematically undermined Li Shimin's reputation before the aging monarch.
Escalation and the Plan to Disarm the Qin Mansion
In 624, during the Yang Wangan incident, the commander of Qingzhou mutinied after illegally transporting armor for the crown prince. Although Emperor Gaozu initially promised the crown prince position to Li Shimin to ensure the rebellion's suppression, the emperor reversed his decision following factional lobbying, exacerbating familial paranoia. Later, Li Shimin suffered severe internal poisoning after dining at the crown prince's residence. By early 626, Li Jiancheng and Li Yuanji persuaded the emperor to exile core strategists Fang Xuanling and Du Ruhui from the capital, while General Cheng Yaojin was transferred to regional command and Yuchi Jingde was subjected to assassination attempts and imprisonment. In the fifth month of 626, when tens of thousands of Eastern Turkic cavalry invaded the northern borders, Li Jiancheng recommended that Li Yuanji command the expedition, intending to strip Li Shimin of his veteran officers—including Qin Shubao, Yuchi Jingde, and Cheng Yaojin—and ambush Li Shimin during the military farewell ceremony.
Detailed Course of Events
Secret Denunciation and Suborning the Gate Command
Faced with imminent destruction, Li Shimin's inner circle urged instant counter-action. Zhangsun Wuji, Yuchi Jingde, and Hou Junji pressed Li Shimin to take decisive action before his forces were dismantled. Zhangsun Wuji secretly summoned Fang Xuanling and Du Ruhui back to the Qin mansion disguised as Taoist priests to finalize the ambush plan. On the third day of the sixth month, Li Shimin submitted a classified memorial to Emperor Gaozu, charging Li Jiancheng and Li Yuanji with treasonous collusion with imperial concubines and plotting fratricide. Greatly alarmed, Gaozu ordered all three princes to appear at court the following morning for formal interrogation.
That evening, Consort Zhang dispatched an urgent messenger warning Li Jiancheng of the denunciation. Li Yuanji urged his brother to claim illness and assemble their private guards to observe developments from safety. However, overestimating his grip on palace security and assuming the gate guards remained loyal, Li Jiancheng insisted on entering the palace to clear his name. Crucially, Li Shimin had already suborned Chang He and Jing Junhong, commanders of the North Gate guards, through immense bounties and personal ties. The gatekeepers pledged to throw open Xuanwu Gate to admit the Qin mansion's elite warriors while denying entry to enemy relief units.
The Ambush at Xuanwu Gate and Fratricidal Bloodshed
At dawn on July 2, 626, Li Shimin led nine trusted commanders—including Zhangsun Wuji, Yuchi Jingde, Hou Junji, Zhang Gongjin, and Liu Shili—alongside several hundred elite horsemen to take up concealed positions within Xuanwu Gate near Linhu Lake. Shortly after daybreak, Li Jiancheng and Li Yuanji rode side by side through the gate into the palace interior. Approaching Linhu Lake, the brothers sensed abnormal silence and irregular sentry deployments. Alarmed, Li Yuanji pulled his reins, alerting Li Jiancheng to turn their mounts and retreat toward Xuanwu Gate.
Emerging from concealment, Li Shimin galloped forward shouting for them to halt. In panic, Li Yuanji notched an arrow to his bow, but trembling hands prevented him from drawing the bowstring three consecutive times. Li Shimin loosed a single arrow with deadly precision, striking Li Jiancheng and killing him instantly. Moments later, Li Shimin's charger bolted into nearby woods, and the prince was knocked from the saddle by a low-hanging tree branch. Li Yuanji rushed forward, seizing Li Shimin's discarded bow to throttle his fallen brother with the bowstring. At that critical instant, Yuchi Jingde rode up brandishing his lance, shouting with thunderous fury. Terrified, Li Yuanji abandoned his prey and fled on foot toward Wude Hall, where Yuchi Jingde overtook him and shot him dead.
The Defense of Xuanwu Gate and Troop Dispersal
Word of the slaughter reached the outer quarters, prompting the immediate mobilization of the Eastern Palace and Qi mansion garrisons. Elite commanders Xue Wanche, Feng Li, and Xie Shufang led over two thousand Changlin warriors and heavy cavalry in a furious assault against Xuanwu Gate to avenge their masters and storm the palace. Gate commander Jing Junhong and Vice Commander Lu Shiheng sallied forth to repel the assault, both perishing in fierce melee combat before the ramparts.
As the gate threatened to buckle under waves of enemy arrows, warrior Zhang Gongjin displayed prodigious strength, single-handedly pulling shut the colossal iron-clad leaves of Xuanwu Gate, sealing the attackers outside. Frustrated at the gate, Xue Wanche threatened to march his forces directly against the undefended Qin mansion. At this perilous juncture, Yuchi Jingde severed the heads of Li Jiancheng and Li Yuanji, displaying them prominently atop the ramparts. Seeing their royal patrons decapitated, the attacking soldiers lost all will to fight, disintegrating within minutes as Xue Wanche and Feng Li fled into the Zhongnan Mountains.
The Sea Palace Audience and Transfer of Imperial Authority
While combat raged at Xuanwu Gate, Emperor Gaozu was leisurely drifting in an imperial boat on the palace pleasure lake. Li Shimin dispatched Yuchi Jingde to secure the sovereign. Fully clad in bloodstained armor and bearing his battle lance, Yuchi Jingde marched directly onto the imperial barge. Shocked by the warrior's appearance, Gaozu demanded: "Who is inciting rebellion today, and why are you here armed?" Yuchi Jingde calmly answered: "The Prince of Qin has executed the crown prince and Prince of Qi for their treason against the imperial house. Fearing Your Majesty might be alarmed, he dispatched me to serve as your bodyguard."
Stunned by the news, Emperor Gaozu consulted Senior Chancellors Xiao Yu and Chen Shuda. Both ministers urged: "Jiancheng and Yuanji possessed no true merit for the realm, acting solely out of jealousy. The Prince of Qin's achievements shelter the four seas. If Your Majesty entrusts all state and military affairs to him, peace will instantly prevail." Resigned, Gaozu sighed: "So be it; this fulfills my long-cherished wish." The emperor issued immediate imperial edicts ordering all palace forces to cease combat and submit to Li Shimin. Three days later, Li Shimin was designated Crown Prince with full executive powers. On September 4, 626, Emperor Gaozu formally abdicated, and Li Shimin ascended the imperial throne as Emperor Taizong.
Key Figures
The Prince of Qin Faction
- Li Shimin (Emperor Taizong): Paramount military commander of Tang who directed the coup, eliminated his rival brothers, and founded the Reign of Zhenguan.
- Zhangsun Wuji: Chief strategist and brother-in-law of Li Shimin, who insistently urged preemptive action and planned the tactical execution of the ambush.
- Yuchi Jingde: Vanguard warrior of the Qin mansion who killed Li Yuanji, displayed the severed heads to shatter enemy morale, and secured the emperor.
- Fang Xuanling: Chief administrative architect who secretly returned to the Qin mansion in Taoist garb to formulate the political transition plan.
- Du Ruhui: Premier legal and military strategist who co-directed planning alongside Fang Xuanling, forming the core administrative brain trust of the coup.
- Zhang Gongjin: Mighty commander who single-handedly shut Xuanwu Gate against overwhelming attacking forces, preventing the capture of the inner palace.
The Crown Prince and Prince of Qi Faction
- Li Jiancheng: Firstborn son of Gaozu and Tang Crown Prince, who commanded the Changlin troops and was struck down by Li Shimin's arrow at Linhu Lake.
- Li Yuanji: Prince of Qi and martial ally of Li Jiancheng, who fiercely opposed Li Shimin and was killed while fleeing toward Wude Hall.
- Xue Wanche: Fierce general under Li Jiancheng who mounted the counter-assault against Xuanwu Gate, subsequently pardoned and retained by Emperor Taizong.
- Feng Li: Eastern Palace commander who killed gatekeeper Jing Junhong, later recruited into imperial service by Emperor Taizong.
The Imperial Sovereign
- Emperor Gaozu of Tang (Li Yuan): Founding emperor of Tang, who failed to resolve the lethal succession rivalry and was compelled to surrender executive power.
Results and Impact
Results
The Incident at Xuanwu Gate concluded with the absolute victory of the Prince of Qin faction. Li Jiancheng, Li Yuanji, and their ten sons were executed, eradicating their biological lineages to prevent future dynastic retaliation. Li Shimin assumed complete command of imperial guard divisions, executive ministries, and fiscal offices, securing elevation to crown prince before ascending the throne within sixty days. Demonstrating immense political magnanimity, Li Shimin refused to broaden reprisals, pardoning and integrating core Eastern Palace ministers—including Wei Zheng, Wang Gui, and Xue Wanche—to reunify the civil administration.
Impact
The coup was the most consequential palace upheaval in imperial Chinese history. By employing surgical, ruthless violence, it abruptly severed years of crippling factional paralysis that threatened to plunge the nascent dynasty into civil war. Ascending the throne, Emperor Taizong instituted rigorous meritocratic governance, welcomed fearless administrative criticism, subjugated the Eastern Turkic Khaganate, and reestablished continental Silk Road dominion, being acclaimed as Tian Kehan (Heavenly Khagan). His enlightened policies fostered the legendary Reign of Zhenguan, laying the foundational prosperity for three centuries of Tang dynastic glory. Conversely, the bloody precedent of acquiring the throne through fratricidal palace insurrection cast an enduring shadow over subsequent Tang successions, contributing to frequent military coups throughout the mid-to-late imperial era.
Historical Evaluations
- Old Book of Tang (Jiu Tang Shu): "Suppressing chaos through brilliant plans, he directed strategy at Xuanwu Gate. The illustrious winds of Zhenguan are praised across a thousand ages."
- Sima Guang, Comprehensive Mirror for Aid in Governance: "By rites, the eldest son should be heir. Yet Gaozu gained the realm entirely through Taizong's merits. Threatened by jealous siblings, Taizong acted out of necessity, ascending the throne to achieve universal peace—how grand indeed!"
- Wang Fuzhi, On Reading the Comprehensive Mirror for Aid in Governance: "Taizong personally shot Jiancheng and Yuchi Jingde slew Yuanji not out of cruelty toward brothers, but because the crisis left no choice: without killing, they would perish and the dynasty collapse."
Related Entries
- Reign of Zhenguan
- Grand General of Heavenly Strategy
- Li Jiancheng
- Li Shimin
- Yuchi Jingde
Bibliography
- Old Book of Tang (Jiu Tang Shu), Volume 2, "Basic Annals of Taizong"
- Old Book of Tang (Jiu Tang Shu), Volume 64, "Biographies of Crown Prince Jiancheng and Prince Yuanji"
- New Book of Tang (Xin Tang Shu), Volume 2, "Basic Annals of Taizong"
- New Book of Tang (Xin Tang Shu), Volume 79, "Biographies of the Sons of Eleven Emperors: Li Jiancheng"
- Comprehensive Mirror for Aid in Governance (Zizhi Tongjian), Volume 191, "Tang Annals 7"