Wei Zheng (580 – 11 February 643),wuchen day of the zheng month of the 17th year of the Zhen'guan era, per Emperor Taizong's biography (vol.3) in Old Book of Tang courtesy name Xuancheng, posthumous name Wenzhen, was a Chinese politician and historian. He served as a chancellor of the Tang dynasty for about 13 years during the reign of Emperor Taizong. He was also the lead editor of the official history of the Sui dynasty, the Book of Sui, which was composed in 636.
Wei Zheng was born to a poor family in modern Hebei, and joined Li Mi's rebellion against the Sui dynasty in his youth. After Li Mi's submission to the Tang Empire, Wei Zheng became a Tang official and eventually served on the staff of Li Jiancheng, the Crown Prince and eldest son of Emperor Gaozu, the Tang dynasty's founding emperor. As such, he served against the interests of Li Jiancheng's younger brother, Li Shimin (the Prince of Qin), with whom Li Jiancheng was locked in an intense rivalry. In 626, Li Shimin ambushed and killed Li Jiancheng, and then effectively forced Emperor Gaozu to yield the throne to him.
Rather than punishing Wei Zheng, however, he was impressed with Wei's faithfulness to Li Jiancheng, and he made Wei an important official, eventually a chancellor. Wei Zheng's promotion to this position gave him far broader freedom to criticise others, particularly the emperor, than other officers of the court. He emphasized propriety and opposed overextending the state. His advice and criticism were not always accepted, but in accordance with Confucian etiquette, the emperor would concede to his suggestions with some regularity.
After Wei Zheng's death in 643, the emperor commented that he was a mirror to show the mistakes of the court, and built an elaborate tomb for him near his own imperial tomb and betrothed one of his daughters, Princess Hengshan, to Wei Shuyu (), Wei Zheng's son. Subsequently, as a result of false accusations made by others in the court, the stone monument that Emperor Taizong had built for Wei Zheng was destroyed, and Emperor Taizong cancelled the planned marriage between Princess Hengshan and Wei Shuyu. However, after the failure of the campaign against Goguryeo in 646, Emperor Taizong, believing that Wei Zheng would have stopped him from going on the campaign had he lived longer, restored the stone monument. Wei Zheng's effect and influence has been examined by many historians long after his death. Wei Zheng is also revered as a minor god of doorways in parts of Taiwan.
Background Wei Zheng was born in 580, shortly before the founding of Sui dynasty in 581. His family was from Julu Commandery (, roughly modern Xingtai, Hebei). His father Wei Changxian () was a county magistrate during Northern Qi. Wei lost his father early in life and was poor, but had great expectations, not caring about making wealth. At one point, he became a Taoist monk. He favored studying, and as he saw that the rule of Emperor Yang of Sui was beginning to make Sui fall into a state of confusion, he particularly paid attention to strategic works.
Service under Li Mi At the end of Emperor Yang's reign, there were many rebellions against Sui rule. One of the major ones was led by Li Mi the Duke of Wei. In 617, the secretary general of Wuyang Commandery (, part of modern Handan, Hebei), Yuan Baozang (), rebelled against the Sui as well and submitted to Li Mi. He invited Wei Zheng to serve on his staff, as his secretary. Wei subsequently drafted submissions from Yuan to Li Mi, suggesting that Li Mi attack and seize nearby Wei Commandery (, also part of modern Handan) and a large food storage that Emperor Yang built, Liyang Storage (, in modern Hebi, Henan). Li Mi was impressed, and when he found out that Wei wrote the submissions, he requested Yuan send Wei to him. He subsequently made Wei his secretary.
In 618, Li Mi was ready for a major confrontation with the Sui general Wang Shichong, who had seized power at the eastern capital Luoyang as the regent to Sui's last emperor Yang Tong (Emperor Yang's grandson). Wei spoke with Li Mi's secretary general Zheng Ting (), advocating that Li Mi take a defensive stance, refusing to engage Wang and draining Wang's food supplies. Zheng rejected the proposal, and the proposal apparently was never submitted to Li Mi. Subsequently, when Li Mi engaged Wang, Wang defeated him. Believing that he could no longer hold out against Wang, Li Mi fled to Tang dynasty territory and surrendered to Emperor Gaozu of Tang. Wei followed him to Tang territory. Subsequently, with Li Mi's major general Xu Shiji (later known as Li Shiji) still holding the Liyang region, Wei requested that Emperor Gaozu send him to Liyang to persuade Xu to submit to Tang as well. Xu did so.
Emperor Gaozu's reign In spring 619, with Yuan Baozang being attacked by Yuwen Huaji the Emperor of Xu (who had led the coup that killed Emperor Yang in 618), Wei went to Yuan to persuade him to submit to Tang. Yuan did so. Wei apparently subsequently went back to Liyang. In winter 619, when Dou Jiande the Prince of Xia, one of Tang's major rivals, attacked and captured Liyang, Wei was among the people captured by Dou, along with Emperor Gaozu's cousin Li Shentong () the Prince of Huai'an, Emperor Gaozu's sister Princess Tong'an, and Li Shiji's father Li Gai (). (Li Shiji was not captured, but several days later felt compelled to surrender to Dou as well, as his father had become a captive.) Dou made Wei his secretary.
In 621, Dou, while trying to aid Wang, under siege at Luoyang by the Tang general Li Shimin the Prince of Qin (Emperor Gaozu's son), was defeated and captured by Li Shimin. The Xia officials initially fled back to the Xia capital Ming Prefecture (洺州, in modern Handan as well) subsequently decided to surrender, and Wei followed Pei Ju back to the Tang capital Chang'an. Emperor Gaozu's oldest son Li Jiancheng the Crown Prince had long heard of Wei's talents, and he invited Wei to serve as his librarian. In 622, with Dou's general Liu Heita having risen against Tang and captured most of former Xia territory, Wei and another staff member, Wang Gui, suggested to Li Jiancheng that due to Li Shimin's accomplishments and fame, he posed a threat to Li Jiancheng, and that Li Jiancheng needed some victories of his own—indicating that he should volunteer to attack Liu. Li Jiancheng agreed, and later in 622 crushed Liu's forces. (Liu was betrayed by his own subordinate Zhuge Dewei () in early 623 and turned over to Li Jiancheng; Li Jiancheng killed him.) As the brothers' rivalry intensified over the year, Wei repeatedly suggested to Li Jiancheng that he must act first and kill Li Shimin. Li Jiancheng could not resolve to do so.
In 626, however, Li Shimin, believing that Li Jiancheng would kill him, ambushed Li Jiancheng and another brother who supported Li Jiancheng, Li Yuanji the Prince of Qi, at Xuanwu Gate, killing them. He then effectively forced Emperor Gaozu to create him crown prince. He summoned Wei and rebuked him, "Why did you alienate us brothers?" Wei's colleagues were all fearful for him, but Wei, instead of begging for forgiveness, stated boldly, "If the Crown Prince had listened to my words, he would not have suffered this disaster." Li Shimin, who had been impressed with Wei himself, was further impressed by the answer, and he changed his attitude and treated Wei with respect, inviting Wei to serve on his own staff. Subsequently, when he sent Wei on a mission to pacify the eastern prefectures, Wei, believing that no one would believe Li Shimin's words that Li Jiancheng's and Li Yuanji's staff members would be spared if some of them, then under arrest, were not released, ordered them released—an act that Li Shimin was pleased with and impressed by. Later in 626, Emperor Gaozu yielded the throne to Li Shimin (as Emperor Taizong). Wei continued to serve in the imperial administration.
Emperor Taizong's reign After Emperor Taizong took the throne, he created Wei the Baron of Julu. Later in 626, when Emperor Taizong buried Li Jiancheng and Li Yuanji with honors due imperial princes, Wei Zheng and Wang Gui requested permission to attend the funeral procession. Emperor Taizong agreed, and further ordered that all officials who served on Li Jiancheng's and Li Yuanji's staffs to attend the funeral procession.
It was said that when Emperor Taizong first took the throne, he was looking for ways to improve his reign. As he believed that Wei had great abilities in governance, he often invited Wei into his own bedroom to converse with him. Wei had the fortitude to speak up for what he saw to be right, and Emperor Taizong often gladly accepted his suggestions. In 627, when it was rumored that Feng Ang (), a former Sui official who had submitted to Tang several years prior, had started a rebellion, and Emperor Taizong wanted to send forces to attack Feng, Wei advised against it, pointing out that Feng did not advance outside his own territories and appeared to be simply fearful that he had been accused of treason. Under Wei's suggestion, Emperor Taizong sent the official Li Gongyan () to comfort Feng; Feng then showed his submission by sending his son Feng Zhidai () to follow Li Gongyan to Chang'an to pay homage to Emperor Taizong. Pleased, Emperor Taizong stated, "Wei had me send a messenger, and as a result the Lingnan region was pacified, better than if 100,000 men were sent. He must receive an award." He awarded Wei with silk. Around that time, he also made Wei a deputy head of the Department of State Affairs.
Later that year, Wei was accused of nepotism. Emperor Taizong had the imperial censor Wen Yanbo investigate, and Wen found no evidence of wrongdoing. Wen nevertheless stated to Emperor Taizong, "Wei did not care about public perception or appearance of conflict of interest. Even though he had no wrongful intent, he should still be rebuked." Emperor Taizong agreed and rebuked Wei, but Wei bluntly refused to accept the rebuke, and Emperor Taizong later retracted the rebuke after concluding that Wei was correct. Throughout the rest of Wei's career, this became a pattern—that Wei would dare to speak against the emperor's opinions or acts despite Emperor Taizong's anger, and while Emperor Taizong did not accept everything that Wei said, he always treated Wei with respect.
In 629, Emperor Taizong made Wei the head of the Palace Library, but gave him the additional designation Canyu Chaozheng (), making him a de facto chancellor. Later that year, when the assistant censor Quan Wanji () accused the chancellors Fang Xuanling and Wang Gui of improper selection of officials, Emperor Taizong initially ordered Hou Junji to investigate. Wei, however, pointed out that both Fang and Wang were trusted officials who should be given free rein and not have the details of their acts be picked on. Emperor Taizong agreed and cancelled the investigations.