Vol. 1 · No. 285 October 2026
Monday, October 12, 2026

The Gate at Xuanwu: A Chinese History Story

Before daylight on 4 June 626, ten men waited inside the northern gate of the palace at Chang-an with a bow. By the time the sun was up, the heir to the throne and his brother were dead in the road, and the empire had changed hands. This is the morning that made the Tang dynasty, and the emperor the world remembers as Taizong.

Before daylight on the fourth day of the sixth month, 626 AD, ten men crouched in the shadow of a tree inside the northern gate of the imperial palace at Chang-an.

The gate was called Xuanwu, and it stood open by a hand’s width.

The leader of the ten was Li Shimin, Prince of Qin. He had a bow in his hand.

All of them were armed, which was against the rules, and none of them expected to be stopped. The three sons of the emperor had all commanded armies. All of them were permitted to ride into the palace with bows and swords at their belts. The guards had long since stopped looking.

Wind came off the hunting park to the north, and there was dew on the grass.

Everyone in that city knew that something was going to happen today.

Nobody knew who it was going to happen to.


First, how three brothers came to be waiting for each other at a palace gate.

In 618 Li Yuan took the throne and founded the Tang dynasty. He had three grown sons who mattered. The eldest, Li Jiancheng, was made heir and stayed in Chang-an to run the government. The second, Li Shimin, was made Prince of Qin and sent out to fight. The fourth, Li Yuanji, was made Prince of Qi and went with him.

Most of the conquering was done by Li Shimin.

Xue Ju, Liu Wuzhou, Wang Shichong, Dou Jiande: name by name, he took them apart in the field. He went on until his father had no rank left to give him, and then the court invented one. He became General of the Heavenly Strategy, a title no one had held before, and it put him above every other prince of the blood.

He was also allowed to keep his own household staff. He had an office full of his own officials, and a literary academy with eighteen scholars in it.

That was the problem.

The heir is the man who will be emperor. But the Prince of Qin had won more battles, held more men and owned more of the public imagination. When people said Tang, they thought of him.

Li Yuan sat between them. Years earlier he had told Li Shimin that if the enterprise succeeded, the empire would be his doing and the succession should be his. Then he gave it to the eldest son anyway.

Jiancheng had his own difficulty. He was not a fool and not a coward. But a younger brother with that kind of record made every order he issued look like a patch over a hole.

The Heir and the General

From about 622 the two sides stopped pretending.

Jiancheng recruited twenty-three hundred fighting men in Chang-an and around the country, formed them into a guard corps and quartered them at the Changlin Gate of the eastern palace. He also quietly asked a prince in the north to send three hundred armoured cavalry from the Youzhou frontier, meaning to attach them to his own household. Somebody informed on him. Li Yuan exiled the officer in charge and said nothing else.

In 624 came the affair of Yang Wengan. Jiancheng sent a subordinate to deliver armour to an old retainer of his commanding a garrison in the northwest. The men carrying it turned around on the road and reported that the heir was raising troops and would move on the capital in concert with the garrison.

Li Yuan was furious. He summoned Jiancheng to the mountain lodge where he was staying. Jiancheng came with a dozen riders, threw himself down and knocked his head on the ground until he nearly stopped breathing.

That time Li Yuan spoke plainly to Li Shimin. Go and put the revolt down, he said, and when you come back you will be heir. Jiancheng can have Shu, in the west.

Li Shimin went. The revolt collapsed. And by the time he returned, Li Yuanji and the palace consorts had worked on his father, and courtiers outside had smoothed the ground, and Li Yuan had changed his mind again.

The succession was never mentioned again.

There was also an account book kept in the inner palace. In his later years Li Yuan had many consorts, and two of them in particular, Lady Zhang and Consort Yin, were close to Jiancheng and Yuanji. Li Shimin made a point of not courting them, and he made enemies on the way.

Lady Zhang wanted a piece of farmland for her father. Li Yuan had already written out the grant. Li Shimin had already given the same land to somebody else. Consort Yin had a father who behaved badly in the streets; when Du Ruhui, an officer of the Qin household, rode past his gate without dismounting, the family servants pulled him off his horse and broke one of his fingers.

These people talked to the emperor every day.

The histories also record that Jiancheng invited Li Shimin to drink and put something in the wine, and that Li Shimin was carried home in pain, having vomited a great deal of blood. That story comes from a later account, and how much of it is true cannot be settled. What matters is that it was written down and believed. By that year, men were ready to believe that the two of them had come to poison.

The Farewell at Kunming Pool

In the summer of 626 an opening appeared.

Turkic cavalry crossed the frontier and laid siege to a town in the north. Jiancheng proposed to the emperor that Li Yuanji take the field in place of the Prince of Qin.

Li Yuan agreed.

Yuanji then asked for the officers of the Qin household to go with him: Yuchi Jingde, Cheng Zhijie, Qin Shubao, Duan Zhixuan. All of them, leaving nobody.

He also asked for a portion of Li Shimin’s best troops to be transferred into his own command.

The purpose was not hidden. Strip the claws first, and take the animal later.

In the sixth month an official of the eastern palace named Wang Zhi came running to Li Shimin with a warning. Jiancheng and Yuanji, he said, had settled the details. At the farewell banquet, which would be held at the Kunming Pool, men would drag Li Shimin from the table and kill him, and the news would be given out as a sudden illness.

Li Shimin took this to his closest men.

They told him to move first.

He hesitated, and said the thing that is quoted from him in every account: to shed the blood of your own flesh is the great evil of every age, ancient and modern.

Yuchi Jingde answered him hard. If the prince would not decide, then Jingde would have to run for his own life.

Someone else brought up an old case. When the brother of the sage king Shun tried to kill him, down a well and on a granary roof, Shun did not stay in the well and die. He walked out, and the work of the world got done.

So they settled it.

A palace gate standing ajar at first light with men waiting inside - Chinese history illustration

Before Daylight at the Gate

One move came before the killing.

On the third of the month the planet Venus crossed the daylight sky. The court astronomer, Fu Yi, sent the emperor a confidential note. It said that Venus had appeared in the division of Qin, and that the Prince of Qin was destined to hold the empire.

Li Yuan called Li Shimin in and demanded an explanation.

Li Shimin did not explain the sky. He laid a different charge: that Jiancheng and Yuanji had carried on with the women of the inner palace.

Li Yuan was stunned. He said he would question the two of them in person in the morning.

That sentence fixed the next day. Jiancheng would have to come into the palace.

Lady Zhang sent word to the eastern palace that same night. Yuanji said they should muster their troops, plead illness and stay away, and watch how things fell out.

Jiancheng said the troops were already in place, and that he would go in and settle it face to face.

At dawn on the fourth, Jiancheng and Yuanji rode out of the eastern palace, entered the Xuanwu Gate and turned toward the Linhu Hall.

Halfway along, Jiancheng felt that something was wrong.

He turned his horse to go back. Li Shimin called out to him from behind.

Yuanji moved first. He had his bow up and he shot, three times, and three times he could not draw it to the full.

Li Shimin shot once.

The arrow went through Jiancheng’s throat. He came off the horse.

Yuchi Jingde arrived at that moment with seventy riders and shot Yuanji out of the saddle.

Li Shimin’s own horse bolted with him, crashed into a stand of trees and brought him down. Yuanji got to him, took the bow and tried to strangle him with the string.

Yuchi Jingde came up at a gallop and shouted. Yuanji let go and ran for the Hall of Virtue, and was shot in the back before he reached it.

By then two thousand men of the eastern palace and the Qi household had reached the outside of the gate.

They beat on it and tried to force it. Zhang Gongjin, who was enormously strong, closed the gate alone and held it from the inside. The general in charge of the palace guard rode out to fight and was killed in front of it.

It was beginning to look as though the gate would go. Then Yuchi Jingde held up the heads of Jiancheng and Yuanji.

The men outside saw them, and the attack came apart.

A Boat on the Sea Pond

Inside the palace, on a small lake called the Sea Pond, the emperor was in a boat with several of his chief ministers.

He did not yet know what had happened outside. He was waiting for the three of them to come and be questioned in his presence.

The man who came was Yuchi Jingde, in armour, with a spear in his hand, walking all the way to the edge of the water.

Li Yuan was badly frightened. He asked who was in revolt, and what the meaning of this was.

Yuchi Jingde said this. The Prince of Qin has raised troops and put the heir and the Prince of Qi to death, because they were making rebellion. He feared it would alarm Your Majesty, and he has sent me to guard you.

The emperor understood the word guard.

He turned to Pei Ji, beside him, and asked what was to be done.

Xiao Yu and Chen Shuda answered. Jiancheng and Yuanji, they said, took no part in the founding of the dynasty and have no great service to their name. They envied the Prince of Qin and joined in plots against him. He has now put them down. The best course is for Your Majesty to hand him the government.

Li Yuan nodded and said: Good. It has always been my wish.

Three days later Li Shimin was made heir to the throne, and the edict added a line: from now on, all military and civil business, great and small, is to be decided by the heir before it is reported to Us.

Two months later Li Yuan abdicated. Li Shimin took the throne in the Hall of Manifest Virtue. He was twenty-eight years old.

The ten sons of Jiancheng and Yuanji were all put to death and struck from the imperial genealogy. In the histories that takes one line.

He Kept Wei Zheng

At the clearing up, one thing is worth setting down.

Wei Zheng had been an official of the eastern palace, and he had repeatedly urged Jiancheng to deal with Li Shimin early.

Li Shimin sent for him and demanded to know why he had set one brother against another.

Wei Zheng did not kneel and beg. He said that if the heir had listened to him, this day would never have come.

Li Shimin did not have him killed.

Not only that: he kept him at his own side. Through the whole of the Zhenguan period that followed, Wei Zheng was the man who contradicted the emperor to his face, more than two hundred times, and the emperor took it.

In the same season, the old retainers of the eastern palace and the Qi household who had not been singled out were pardoned and brought back into service. Xue Wanche had led troops against the Xuanwu Gate that morning. He became one of the great generals of the Tang.


After the gate, princely coups became a disease of the Tang imperial house.

The same disease ran in other courts of those centuries. In Constantinople a prince who lost the struggle was often blinded and shut in a monastery, and in the Frankish kingdoms the heir of the old line had his long hair cut and was sent to a cloister. A throne with two grown sons in the family is a throne with a countdown running.

The name Xuanwu kept coming back. In 705 a chancellor brought the palace guards through that gate and forced the Empress Wu to give up the throne. A few years later a crown prince rose in arms and came by the same road. Then Li Longji, the future emperor, sat his horse outside the same gate one night with his own men already moving inside the wall.

In his last years Li Shimin watched his own sons fight over the succession. He set aside his heir and chose the mildest of them, Li Zhi, because he was the one least likely to kill his brothers.

As for Yuchi Jingde and Qin Shubao, they were painted onto doors as guardian spirits. A pair of them, one on each side, standing at the entrance for a thousand years.

They guarded gates.

On the morning in 626, the ten men inside the gate were there because they had walked in.

Like (0)
AdminAdmin
The Grand Canal: A Chinese History Story
Previous 3 days ago
The New Laws of Wang Anshi: A Chinese History Story
Next 3 days ago

Related posts

  • The Pole at the South Gate: A Chinese History Story

    In 338 BCE the man who had remade the state of Qin reached a frontier post and asked for a bed. The innkeeper wanted his papers, because the law of Lord Shang said that anyone who sheltered a traveller without checking his papers answered for it himself. He had none. He sighed, and went on. Twenty years earlier he had set a pole outside the south gate of the market and paid a man fifty jin to carry it across the square, so that the country would believe what he said next.

    1 day ago
  • Seven Voyages, Then Silence: A Chinese History Story

    In 1405 a fleet of more than two hundred ships and twenty seven thousand men sailed out of Fujian under a eunuch admiral named Zheng He. Over twenty eight years it went to Calicut, Hormuz and the coast of Africa, took a pirate chief alive, brought a giraffe home as a qilin, and set up one stone in Ceylon inscribed in three languages. Then the emperor who sent it died, the records were hidden or burned, and the ships rotted in the harbour at Liujiagang.

    1 day ago
  • Dinner at Hongmen: A Chinese History Story

    In 206 BC, with the Qin empire broken and forty thousand men camped behind the hills, Xiang Yu invited his rival to dinner. Through one long meal a sword dancer kept aiming at the guest, a bodyguard pushed past two halberds with a shield, and the host said almost nothing. This is what the historian Sima Qian recorded, down to where every man sat.

    2 days ago
  • The Yellow Robe at Chenqiao: A Chinese History Story

    On the first day of the new year in 960 a frontier dispatch sent the commander of the palace guards out of Kaifeng with the whole army. Three days later his own soldiers wrapped a yellow robe around him in the dark at Chenqiao. The robe was ready, folded, the right size. Four days after the dispatch arrived, a boy of seven signed away the throne and the dynasty changed its name without a single market closing.

    1 day ago
  • The Day the Army Stopped at Mawei: A Chinese History Story

    In the summer of 756 the imperial guard halted on the road west of the Tang capital. The pass at Tongguan had fallen, the signal fire had not come, and the emperor had slipped out of the city before dawn. Two days without food later, the soldiers stopped at a post station called Mawei and would not move until the emperor gave up the woman at his side.

    18 hours ago
  • The Wall and the Watchmen: A Chinese History Story

    A conscript climbs an earthen platform at dawn and looks north across the desert. He and two other men hold one tower of the Han frontier, watching for dust, reading footprints in the sand, and waiting for the order to light a fire that will run tower to tower toward the capital. The wooden slips they left behind have outlasted the wall.

    18 hours ago