Li Shimin, Emperor Taizong of the Tang dynasty, regarded as one of the greatest rulers of one of China’s greatest dynasties, was a man who had trouble sleeping. In popular folktales, he feared ghosts and ordered two of his generals to stand guard at his palace gates to ward off evil spirits. Later, to spare the generals the nightly duty, he had their portraits painted on wooden boards to be hung beside the grand doors in their place. As this practice spread, the two generals became the “door gods,” whose images are still pasted on gateways today. But Taizong’s door gods were guarding a darker mystery. The ghosts the great emperor feared may have been those of his own brothers, who he had deposed in a devious coup at those very same palace gates 1,400 years ago this month.
In Chinese history, this mystery has gone down in the annals as the Xuanwu Gate Incident (玄武门之变), and it is one that has troubled historians since its occurrence. In fact, the annals themselves are part of the trouble. In 635, the ninth year of his reign and right after his father passed away, Taizong demanded to review the Qijuzhu (起居注), the official daily records of the emperor’s words and actions, for objectivity’s sake, usually hidden from the emperor’s eyes. Despite his claim that he wished to learn from both his mistakes and achievements, Taizong was initially refused by the court historians. After repeated requests, he eventually gained access to the records a few years later, and promptly ordered revisions to the entries concerning 626, the year in which he ascended the throne. While the Tang rule is celebrated as one of the most prosperous and cosmopolitan periods in Chinese history, it may have also been one solidified on the back of a historical fabrication.
More on history’s mysteries:
- The “Little Girl” Who Revealed an Empire
- Vanished Empire: Resurrecting China’s Western Xia Tombs
- Mercurial Mystery: What’s Inside the Tomb of China’s First Emperor?
Here is the conventional account of events, as recorded in official histories such as the Old Book of Tang (《旧唐书》):
Li Shimin was a product of military aristocracy. His father, Li Yuan (李渊), led a successful rebellion against the Sui dynasty (581 – 618) in 617, capturing the capital Chang’an and ascending the throne a year later as Emperor Gaozu, founder of the Tang dynasty.
During the founding campaigns, Li Yuan’s three sons—Li Jiancheng (李建成), Li Shimin, and Li Yuanji (李元吉)—each played their part, but Li Shimin’s military achievements far exceeded the others’. After the Tang was established, it crushed the major regional warlords, effectively securing the empire. In 621, Li Yuan established a personal military and administrative office for Li Shiming, Tiance Office (天策府), and awarded him the unprecedented title “ Prince of Tiance (天策上将),” ranking him above all other princes.
Yet when it came to succession, Li Yuan chose Li Jiancheng, the eldest son, as crown prince, following ancient tradition. On one side stood the legitimate heir; on the other, a brother whose glory overshadowed the throne itself. As the Tang empire expanded, the tension between the two grew ever sharper. Li Yuan vacillated between them, while the youngest brother, Li Yuanji, sided with the crown prince. Five years later, the succession struggle reached its breaking point.
In 626, the Türks (“Tujue” in Chinese) invaded the Tang border. The crown prince proposed that their youngest brother take command of the army to resist, and that the elite generals and troops of Li Shimin’s household be transferred to Li Yuanji’s control. Emperor Gaozu approved. The crown prince then planned to have Li Shimin assassinated during a farewell banquet. But Li Shimin learned of the plot through a spy and decided to attack first.
On the third day of the sixth lunar month, Li Shimin entered the palace and reported to their father that his two brothers had committed adultery with imperial concubines, used them to influence the emperor’s decisions, and launched a smear campaign against him. Furthermore, they were plotting to kill him. The emperor ordered the three brothers to appear at court the next day to confront each other.
At dawn the following day, Li Shimin and nine of his followers took up positions inside the Xuanwu Gate, the northern gate of the palace. As Li Jiancheng and Li Yuanji rode through the gate to meet their father, they sensed something was wrong, and turned their horses to flee back. But Li Shimin showed up and shot Li Jiancheng dead with a single arrow. His subordinate, General Yuchi Gong (尉迟恭), then arrived with 70 cavalry and killed Li Yuanji.
Soon after, 2,000 soldiers from the forces of the crown prince and the Li Yuanji stormed the Xuanwu Gate. The defenders held them off. Yuchi Gong displayed the severed heads of the two princes to the attacking soldiers, who scattered.
Yuchi Gong then entered the palace in full armor and carrying a spear, and approached Emperor Gaozu, who was boating on a lake. He informed the emperor that the two princes had been executed for treason and that he had come to protect His Majesty. Soon, the emperor issued an edict handing over command of the military to Li Shimin. Two months later, Li Yuan abdicated, and Li Shimin ascended the throne as Emperor Taizong. His 23-year reign, known as the Zhenguan Era, later became one of the great golden ages of ancient China.
While the official history paints Li Shimin in a righteous light, historians have long suspected that the dramatic story may not be the entire truth.
The strongest evidence of Li Shimin’s intervention comes from his own words. According to the Essentials of Government in the Zhenguan Era (《贞观政要》), after finally gaining access to the records he had long sought to read, Li Shimin complained that the accounts were too “vague.”
He then cited two precedents from the Spring and Autumn period (770 – 476 BCE)—the Duke of Zhou executing his brothers, and Lu State noble Jiyou (季友) poisoning his—to argue that his own actions at Xuanwu Gate were no different: all were done “to bring stability to the state and benefit the people.” The message was clear: Li Shimin personally shaped how the incident would be recorded, and the version we read today in official histories is the revised one.
But contradiction can still be found in other sources, such as the portrayal of Crown Prince Li Jiancheng. In the official histories, he is depicted as a talentless womanizer. Yet according to the Records of the Founding of the Great Tang (《大唐创业起居注》) by Wen Daya (温大雅), a scribe who served in Li Yuan’s court, Li Jiancheng played a significant role in the early Tang campaigns—leading troops, devising battle plans, and fighting the Türks.
Doubts about the official account are not a modern invention. As early as the Song dynasty (960 – 1279), the historian Sima Guang (司马光), while compiling his monumental Comprehensive Mirror for Aid in Government (《资治通鉴》), wrote: “Although Jiancheng and Yuanji may indeed have had their faults, once they were executed by Taizong, the historians could hardly have avoided exaggerating or covering up. Therefore, such accounts should not be accepted in their entirety.” Yet he still relied on these records, because no better sources existed.
The rights and wrongs of the Xuanwu Gate Incident have been debated for centuries. Fan Zuyu (范祖禹), another Song historian, criticized Li Shimin from the standpoint of ritual propriety in his work Mirror of the Tang (《唐鉴》), arguing that killing the crown prince—even a mediocre one—was a violation of the proper order between ruler and subject. Song-dynasty politician Su Zhe (苏辙), by contrast, blamed their father, Li Yuan, for choosing the eldest son over the most capable one.
Sima Guang offered a more balanced view, seeing the tragedy as structural rather than merely personal: Li Shimin had won the empire, but Li Jiancheng held the throne by birthright; the clash was inevitable.
The Xuanwu Gate Incident brought an end to the chaos of the early Tang and marked the start of a period of prosperity. However, it also shattered the tradition of the eldest son inheriting the throne, making succession disputes a recurring source of instability throughout the early Tang.
When Li Shimin demanded to see the official records, he asked the court historian Chu Suiliang (褚遂良), “If I were to do something wrong, would you record it as well?” Chu answered that it was the duty of a historian to keep the record faithfully. Another official, Liu Ji (刘洎), observed, “Even if he did not, the people of the realm would remember it.” Fourteen centuries later, his words ring true. History can be rewritten, but the act of rewriting itself becomes part of history, and the desire to know what really happened has never faded.