When Shang Yang carried out the political reform in Qin State, it was during the reign of Qin Xiaogong. At that time, the state of Qin was not as arrogant as at the end of the Warring States period. Qin is remote and barren, so it is not only poor, but also lags behind other vassal States militarily, mainly because of its poor national strength. The reason why Qin's national strength can't go up is that Qin's thought is too backward and there are too many aristocratic privileges. The so-called people are rich and the country is strong, and the old Qin State is only rich in nobles, so it is impossible for the old Qin State to be strong in national strength. If the old state of Qin was poor, it was also a big deal to tighten your belt from top to bottom, but in the Warring States period, you were poor and weak, and you deserved to be beaten. At that time, although the vassal States looked down on the barren land of the old Qin State, they at least widened some territory and annexed the land bordering the old Qin State, so it was not bad to make military preparations. Therefore, before and after Qin Xiaogong ascended the throne, the old State of Qin suffered from the wars of vassal states, and the old State of Qin almost perished.
It is precisely because of this dangerous situation that Qin Xiaogong devoted his life to improving the national strength of Qin State, making Qin State stronger and making him no longer bullied by other vassal states. Shang Yang is the man who changed the crisis of Qin State. His political reform in the state of Qin made the state of Qin strong. Qin Xiaogong trusted him very much and gave him a high position and honor in the State of Qin. Although Shang Yang's political reform made Qin powerful, it deeply hurt the interests of Qin nobles. In fact, although Shang Yang's political reform started from military, political, people's livelihood and other aspects, its essence was to weaken aristocratic privileges in all aspects, which can be understood as the implementation of feudalism in Qin State at that time and the gradual elimination of the harmful effects of slavery. From the national level, Shang Yang's political reform benefited the country and the people, which was not conducive to the nobility. In addition, in the process of political reform, the illegal acts of the nobles were severely dealt with, which made the nobles hate Shang Yang. But Qin Xiaogong trusted Shang Yang very much and tried his best to maintain him, so the nobles hated Shang Yang even more.
Although the national strength of the old Qin State gradually improved in the end, the nobles of the old Qin State hated Shang Yang. Of course, when Qin Xiaogong was alive, Qin Xiaogong protected Shang Yang, and no one dared to touch him. After all, Qin Xiaogong was an iron-blooded emperor, who protected Qin many times on the battlefield. When he was alive, his prestige and ability were able to resist those nobles. However, after his death, Qin was in the period of power transfer, and the strength and prestige of the new king were not enough to protect Shang Yang. If he goes his own way, he may push the nobles back, so Qin's hard-earned family business may be destroyed. Moreover, if they fight with the nobles, the nobles will support and support their king to ascend to the throne. If there is chaos in Qin State and Shang Yang's political reform can only be abolished, it is even more impossible for Qin State to improve its national strength.
That is to say, the death of Shang Yang is actually useful to the State of Qin. Although he is innocent to Shang Yang, if he does not die, Qin will be in chaos, and Qin will be in turmoil from then on, and it is likely to be destroyed by other vassal States in the end. Of course, King Huiwen of Qin had many ways to deal with Shang Yang, and it was not necessary to exterminate the nation. After all, Shang Yang was a meritorious minister to the State of Qin, and it was his fault that King Huiwen killed Shang Yang. However, after Shang Yang's death, King Huiwen of Qin did not abolish Shang Yang's political reform, and also avoided the civil strife in Qin. For the state of Qin, it was beneficial for King Huiwen to kill Shang Yang, so he did more than he did.