In the thirteenth year of Daye (617), Wei Zheng became an official under the account of Cheng Yuan Baobao in Wuyang County. Yuanbao raised troops to respond to Li Mi of Wagang. Yuanbao's memorials to Li Mi were all written by Wei Zheng. Li Mi saw that Wei Zheng was very talented in literature, so he summoned Wei Zheng. Wei Zheng offered ten strategies to strengthen Wagang, but Li Mi did not use them.
In the fourteenth year of Daye (618), Wang Shichong attacked Cangcheng and was defeated by Li Mi. Wang Shichong turned to Luokou and was defeated by Li Mi. However, Wei Zheng said to Chief Shi Zheng Ting: "Although Li Mi won many victories, many generals were killed and wounded. There is no treasury in Wagang, so the soldiers will not get rewards for their military exploits. It is better to occupy the deep trenches and high forts." The way to win is to stay in a stalemate with the enemy until the enemy runs out of food and retreat. This is the way to win. If there is no food in Luoyang, Wang Shichong will have no choice but to engage in a decisive battle with our army. At this time, we will not fight with him. " Zheng Ting disagreed with Wei Zheng's words and said that it was a commonplace. Wei Zheng said: "This is a clever and profound strategy, how can it be a cliché?" and left with a puff of sleeves. In the second year of Tang Wude (619), Li Mi was defeated by Wang Shichong, and Wei Zheng followed Li Mi and surrendered to Li Tang. Li Mi's general Li Ji still occupied the territory that Li Mi originally had jurisdiction over, stretching from the sea to the east, the Yangtze River to the south, Ruzhou to the west, and Wei County to the north. Li Mi surrendered to Li Tang, and Li Ji occupied such a large area and didn't know where to go. Wei Zheng then recommended himself and asked to appease Shandong. When he arrived in Liyang, Wei Zheng wrote a letter to Li Ji, urging Li Ji to surrender. Li Ji then sent an envoy to Chang'an to give all the credit for the dedication of the city to Li Mi, and then escorted the grain and grass to Li Shentong.
In September of the same year, Dou Jiande led his army to attack Xiangzhou. Li Shentong could not resist it and led his army to Liyang, where he was defeated by Dou Jiande. Wei Zheng, Li Shentong and Li Ji were all captured. Dou Jiande used Wei Zheng as his living roommate.
In the fourth year of Wude (621), Li Shimin led his army to attack Wang Shichong, and Dou Jiande led his army to support Wang Shichong. In May, Li Shimin defeated Dou Jiande and captured him alive. Wei Zheng was able to enter the Tang Dynasty again. The prince Li Jiancheng used Wei Zheng to wash the prince's horses, and he was treated with great courtesy.
In the fifth year of Wude (622), Liu Heita colluded with Turkic bandits to invade Shandong. Wei Zheng saw that although Li Jiancheng was the eldest son, his achievements were not as good as those of Li Shimin, so he suggested that Li Jiancheng go to the war to make meritorious service. Li Jiancheng followed Wei Zheng's suggestion, captured Liu Heita, and pacified Shandong.
In the ninth year of Wude (626), Li Shimin launched the Xuanwumen Incident and killed Li Jiancheng, Li Yuanji and others. Li Shimin heard that Wei Zheng often advised Li Jiancheng to arrange Li Shimin elsewhere. Li Shimin sent someone to take Wei Zheng and asked: "Why do you want to alienate our brothers?" Wei Zheng replied: "If the prince does what I say, There would be no such disaster as today." Li Shimin saw that Wei Zheng spoke frankly and did not hide anything, so he pardoned Wei Zheng and appointed Wei Zheng as the director of Zhan affairs. In the first year of Zhenguan (627), Li Shimin ascended the throne and appointed Wei Zheng as Shangshu Zuocheng. Li Shimin was determined to establish a prosperous age, so he summoned Wei Zheng to his bed many times to inquire about the gains and losses. Wei Zheng spoke frankly and gave advice on more than 200 matters, which Li Shimin fully accepted.
In the same year, the former prince Li Jiancheng and the former relatives of Qi King Li Yuanji in Hebei were in danger due to the Xuanwumen Incident. Li Shimin sent Wei Zheng to Hebei to pacify them. On the way, Wei Zheng happened to meet Prince Qianniu Li Zhian and King Qi's guard Li Sixing being escorted to the capital. Wei Zheng asked them to be released and still appointed officials, so that the old relatives of the Prince of Hebei would believe that Li Shimin really wanted to pardon them.
In the third year of Zhenguan (629), Wei Zheng was appointed secretary-supervisor and began to participate in government affairs. Wei Zheng reported to Li Shimin that he led scholars to divide the ancient books into four parts and correct them.
In the fifth year of Zhenguan (631), Li Shimin talked with Wei Zheng about selecting officials. Wei Zheng said that he should first understand his talents, and then examine his moral character and hobbies.
Li Lizhi, the princess of Changle, was born to Empress Changsun. Li Shimin was particularly fond of her and betrothed her to Changsun Chong, the son of Changsun Wuji. In the sixth year of Zhenguan (the fifth year of Zhenguan in the old Tang Book Wei Zheng), preparations for the dowry began. Li Shimin of the Tang Dynasty said to the ministers, "Princess Changle, born to the queen, is loved by me and the queen. Now she is about to surrender, so I would like to increase my etiquette." . The ministers expressed one after another that "Your Majesty loves you and wants to do less", so they proposed to request double the number of princesses in Yongjia, and Li Shimin readily agreed. However, Wei Zheng objected to this. Because Princess Yongjia is the aunt of Princess Changle. This move went beyond etiquette. Li Shimin returned to the palace and told Queen Changsun about the matter. After Empress Changsun learned of this, she lamented that Wei Zheng could "introduce etiquette and righteousness to suppress the feelings of the master" and praised him greatly. He specially sent people to reward Wei Zheng with 400 pieces of silk and 400 coins, and sent a message saying: "I heard that you are upright, and now I have seen it. I hope you will maintain it and not change." When Li Shimin didn't say anything, Empress Changsun directly rewarded Wei Zheng and hinted that she would provide support, which could be said to be a booster for Wei Zheng. It was precisely because of a backer like Empress Changsun that Wei Zheng's righteous admonishment went so smoothly. Soon Wei Zheng was promoted to the title of Duke.
In the seventh year of Zhenguan (633), Wei Zheng replaced Wang Gui as the minister. There was a long backlog of unadjudicated lawsuits in the Shangshu Province. Li Shimin ordered Wei Zheng to handle them impartially. Wei Zheng was not very familiar with the law, but he could grasp the basic principles and deal with the situation according to the actual situation, and everyone was convinced.
In the eighth year of Zhenguan (634), Shaanxi County Prime Minister Huangfu Deshen wrote a letter, which angered Li Shimin. Li Shimin thought it was slander.
Wei Zhengjin said: "In the past, when Jia Yi wrote to Emperor Wen of the Han Dynasty, he once said, 'There is one thing for which you can cry bitterly for the emperor, and there are six things for which you can sigh for the emperor.'" Since ancient times, when writing letters to commemorate matters, the words are often very passionate. If you are not passionate, you will not be able to move the heart of the Lord. Your Majesty, you should think carefully about whether this is right or not." Li Shimin felt that what Wei Zheng said was reasonable, and ordered to reward Huangfu with twenty pieces of silk silk. .
In the tenth year of Zhenguan (636), Queen Changsun passed away and was buried in Zhaoling. She was posthumously named Queen Wende. After Empress Changsun was buried in Zhaoling, Li Shimin couldn't stop missing her. In order to ease the pain of missing her, he built a layered view in the palace to overlook his wife's tomb all day long, and even asked ministers to accompany her to mourn. Once Li Shimin asked Wei Zheng to accompany him, and pointed in the direction of Zhaoling and asked Wei Zheng if he could see it clearly. Wei Zheng pretended not to see it. Li Shimin suddenly became anxious and asked, "How could you not see it? That is Zhaoling!" Wei Zheng replied, " I thought your majesty was looking at Xianling, but it turned out to be Zhaoling!" After hearing this, Li Shimin understood that Wei Zheng was reminding him not to only miss his deceased wife and forget his father. So he cried and ordered the layered view to be demolished. Although Li Shimin's behavior of commemorating his wife in this way goes against the ethical traditions, it is a true expression of the emperor's feelings.
In the eleventh year of Zhenguan (637), Li Shimin visited Luoyang east and lived in Xianren Palace. Most of them were condemned because of poor worship by state and county officials. Wei Zheng told Li Shimin that Emperor Yang Guang of the Sui Dynasty once asked the nearby people to pay tribute here. The tributes were thrown away before they could be eaten, which was very wasteful.
In the twelfth year of Zhenguan (638), Wang Gui, the Minister of Rites, wrote in a memorial: "Officials of the third rank and above got out of the car when they met the prince on the road, violating the law to show respect, which violated the standards of etiquette. "Li Shimin said: "You are in a noble position, so you despise my son?" Wei Zheng said: "From ancient times to the present, the princes are ranked under the three princes. The prince getting off the car is not a courtesy that the prince should receive. There is no basis for it to be based on the old rules; it violates the national law if it is implemented now. "Li Shimin said: "The reason why the country established the prince is to prepare him to be the king. The merit of a person does not depend on his age. If there is no prince, then the younger brother of the prince's mother will be appointed in turn. How can you despise my son? "Wei Zheng said: "The Yin Dynasty advocated simplicity, and there was a ceremony for the elder brother to succeed to the throne. Righteousness; since the Zhou Dynasty, the crown prince must be the eldest son, so as to eliminate the selfish thoughts of each brother and block the source of trouble. This is something that the monarch should be very careful about." So Li Shimin agreed to Wang Gui's memorial.
On Bingzi in March of the twelfth year of Zhenguan, Li Chengqian’s legitimate son Li Xiang was born. Because of the joy of the birth of his grandson, Li Shimin of the Tang Dynasty ordered that all prisoners in the world be punished with first-class crimes, and internal and external officials were ranked fifth. The above sons are the fathers of the latter, each of them will be promoted to a distinguished officer, and the world will be in great shape for five days, and there will be a banquet of five ranks and above in the East Palace. Li Shimin said to his courtiers: "Before Zhenguan, he followed me to pacify the world and traveled through troubled times. This was Fang Xuanling's contribution. After Zhenguan, he devoted himself to me and gave me loyal and honest advice to safeguard the country and benefit the people. He dared to offend the monarch's dignity and speak out." "The only person who can correct my fault is Wei Zheng. No famous official in ancient times can surpass them." So he took off his sword and gave it to them both.
In May of the 13th year of Zhenguan, Wei Zheng took advantage of the opportunity of Li Shimin's edict to be promoted to an official of fifth rank or above, and comprehensively and systematically summarized the fact that political affairs were not as good as they were at the beginning of Zhenguan. sparse". The book listed Li Shimin's ten failings, such as searching for treasures, indulging in servitude for the people, being fond of villains, neglecting gentlemen, advocating extravagance, frequently going on hunting trips, raising armies without anything to do, and exhausting the people with hard labor, etc., and criticized Li Shimin's arrogance. Full of emotions, he once again reminded him to be cautious. After Li Shimin read the memorial, he gladly accepted it and said to him: "I have heard about it now, and I am willing to change it so that I can end up on a good path. If you violate this statement, how can you show your face to meet the public! How can I do what I said above? It was set up as a barrier, and the common people saw it day and night, and also recorded it and paid it to the historian, so that the righteousness of the king and his ministers would be known to all generations. "Then he was given ten pounds of gold and two horses.
In the fourteenth year of Zhenguan (640), Wei Zheng gave Li Shimin advice and asked Li Shimin to start well and end well.
In the 16th year of Zhenguan (642), the later crown prince Li Chengqian did not learn virtues and skills. The favor of King Wei Li Tai increased day by day, and officials inside and outside the court had some doubts and discussions. After Li Shimin heard these comments, he was disgusted with these comments and said to his courtiers: "Today's courtiers are more loyal and upright than Wei Zheng. I will send him to assist the crown prince to put an end to the world's complaints." Li Shimin appointed Wei Zheng as the crown prince's preceptor. The door is as hassle-free as ever. Wei Zheng declined claiming to be ill. Li Shimin issued an edict and replied: "The prince of the Han Dynasty is assisted by the four elders. I rely on you now for the same reason. Knowing that you are sick, you can protect the prince even if you are ill." In the 17th year of Zhenguan ( 643 years) Wei Zheng died of illness. Li Shimin was very sad and abandoned the court for five days. Wei Zheng was posthumously given the title of Commander-in-Chief of Sikong and Xiangzhou, with the posthumous title of "Wenzhen".
Li Shimin issued an edict to bury Wei Zheng lavishly, but Wei Zheng's wife Pei refused on the grounds that Wei Zheng lived a simple life and a luxurious funeral was not what the deceased wanted. The Pei family only had a small car to carry Wei Zheng's coffin. Li Shimin summoned all civil and military officials to go out of the city to see it off and personally carved an inscription.
After Wei Zheng's death, Li Shimin often said to the courtiers around him: "Use a bronze mirror to correct your clothes, use ancient history as a mirror to know the rise and fall, and use people as a mirror to see gains and losses." I often use this method to prevent myself from making mistakes, but now that Wei Zheng has passed away, I am missing a mirror.
After Wei Zheng's death, I sent people to his home and got a page of his suicide note. It had just been drafted and the words were hard to read. Only the first few lines were slightly legible. It said: "There are good and evil in the affairs of the world. Whatever you do, you can use your will." A country with good people will be stable, but a country with evil people will decline. Among the ministers, there are love and hatred. If you hate someone, you will only see his evil, and if you love someone, you will only see his goodness. Between love and hate, one should be cautious. If one loves and knows his evil, and hates and knows his good, if one does not hesitate to eliminate evil and appoints virtuous people without suspicion, then the country can prosper. ’ This is the general idea of ??the suicide note. However, when I think about it, I am afraid that I cannot avoid the mistakes Wei Zheng mentioned. My ministers and ministers, please write these words on your hand. If you know that I have made a mistake, you must remonstrate with me. ”
In February of the same year, Li Shimin ordered Yan Liben to paint twenty-four portraits of heroes and place them in Lingyan Pavilion, with Wei Zheng ranking third.
Soon after, Hou Junji was charged with treason. Du Zhenglun was executed and Du Zhenglun was dismissed. Wei Zheng once recommended these two people to Li Shimin, saying that they had the talents of prime ministers. Wei Zheng also gave his own remonstrances before and after to the historian Chu Suiliang. Li Shimin knew that Wei Zheng began to doubt whether Wei Zheng was part of Hou Jun's party. So he issued an edict to cancel the engagement between Princess Hengshan (later named Princess Xincheng) and Wei Zheng's eldest son Wei Shuyu.
In the 19th year of Zhenguan (645), Li Shimin personally conquered Goguryeo, resulting in thousands of soldiers killed and wounded, and ten horses lost. Seventy-eight times, he deeply regretted this move and couldn't help sighing with emotion: "If Wei Zheng were here, I wouldn't be able to do this. "So I ordered Chiyi to worship Wei Zheng with the ceremony of Shaolao and build a new monument.