Although both Confucianism and legalism called for a hierarchy of government and adherence to tradition, the difference between the two schools is that Confucianism advocated a benevolent rule by example. He had an optimistic view of human potential. (Mencius is often cited as a contrasting example of a Confucian philosopher as opposed to the legalistic doctrine of Hsün-tzu.) The difference is also clearly evident in the imagery of the writings of each philosophy. The predominant imagery in the writings of legalism is to straighten or forcibly bend the crooked branches of trees so that they grow perfectly straight, or to use hot irons to burn the branches of trees so that they grow in the desired direction. In the twentieth century, a number of scholars referred to legalists as “totalitarians” (e.g., Greneau, 1953: 135-158; Rubin, 1976: 55-88; Fu Zhengyuan, 1996). Some aspects of the legalistic agenda – a powerful state crushing society, rigid control over the population and administrative apparatus, harsh laws, etc. – seem to support this equation. But when we enter the realm of mind control – a sine qua non of genuine totalitarian politics – the results are somewhat ambiguous. Although Shang Yang and Han Fei have a lot to say on issues of culture and learning, their message is extremely negative: they eagerly expose the errors of their opponents` views, but do not necessarily offer their own ideological alternative. Han Fei`s philosophy focused on the ruler who firmly controls the state using three concepts: his position of power (勢, Shi); certain techniques (術, Shu) and laws (法, Fa). The legalistic concept of human nature is that it is inherently selfish and that everyone acts according to one principle: avoid punishment while trying to make a profit.
Therefore, the law must severely punish any undesirable act while rewarding those who follow it. The second pillar of legalistic political philosophy is his view of human nature. Legalists avoid arguing whether human wickedness or goodness is innate, or whether or not all humans possess fundamentally similar qualities. What matters to them is first that the overwhelming majority of people are selfish and greedy; secondly, that this situation cannot be changed by education or self-cultivation; and third, that people`s selfishness can become an asset to the leader rather than a threat. Let “men follow the benefit as water flows downwards” (Shang jun shu 23:131; Book of Lord Shang 23:2) is obvious: the task is to enable people to satisfy their desire for fame and fortune in a way that meets the needs of the state and does not contradict them. Shang Yang explains how to achieve this: Compared to Plato by sinologist Chris Fraser, the hermeneutics of the Mohists contained the philosophical seeds of what Sima-tan would call the “Fa school” (“legalists”) and contributed to the political thought of contemporary reformers.  The Mohists and the Guanzi text attributed to Guan Zhong are of particular importance to the understanding of Fa, which means “to illustrate” or “to imitate.” :349 , Dan Robins of the University of Hong Kong considers the Fa “important in early Chinese philosophy mainly because of the Mohists.”  During the Qin Dynasty, all books that did not support legalistic philosophy were burned, and writers, philosophers, and teachers of other philosophies were executed. The excesses of legalism of the Qin Dynasty made the regime very unpopular with the people of the time. After the fall of Qin, legalism was abandoned in favor of Confucianism, which significantly influenced the development of Chinese culture.
The founder of the legalistic school was Hsün Tzu or Hsün-tzu. The most important principle in his thinking was that humans are inherently evil and prone to criminal and selfish behavior. So if people are allowed to engage with their natural inclinations, the result will be conflict and social disorder. As a solution to this problem, the ancient wise kings invented morality. Since morality does not exist in nature, the only way to behave morally is through habituation and severe punishment (Lau 120). Like the Italian political philosopher Machiavelli, Hsün Tzu clearly distinguishes between what belongs to heaven and what belongs to man. Later legalistic thought influenced Chinese political theorists such as Tung Chung-shu, who believed in a rigid mathematical relationship in social arrangements. The basic structure and functioning of the traditional Chinese state was not “legalistic” as the term is commonly understood. Although persistent, pre-modern Chinese mainstream thought never really accepted the role of law and jurisprudence or the Shang Yang wing of fajia. The most important contribution of the Fajia lies in the organization and regulation of a centralized and bureaucratic government. Sinologist Herrlee G. Creel called his philosophy administrative, for lack of a better term, because he believed it was founded by Shen Buhai (400-337 BC), who probably played a “leading role in the creation of the traditional Chinese system of government.” [ref.
needed] Han Feizi drew on this aspect of Xunzi`s work, as well as earlier writings from the Warring States period in China (c. 481 – 221 BC) by a Qin statesman named Shang Yang (died 338 BC) to develop his philosophy that, since humans are evil by nature, laws of control and punishment are a necessity for social order. Although legalism led to great loss of life and culture during the Qin Dynasty, it is worth remembering that the philosophy that developed in a period of constant war in China, when each state was fighting for control against all the others, and the enforcement of order in this chaos was obviously considered extremely important. Legalism was discredited by later dynasties and ceased to be an independent school of thought. However, ancient and modern Confucian observers of Chinese politics have argued that some legalistic ideas have merged with mainstream Confucianism and still play a role in government. The philosophy of imperial China can be described externally as Confucianism (along with Buddhism during the Sui and Tang dynasties) and legalism within (儒表法裏). Shen Buhai (申不害† 337 BC) He was the chief minister of the Han from 351 to 337 BC. J.-C., credited with the letter to the shinzi, creating an administrative system integrated with legalism. Shen mainly dealt with government administration through bureaucracy.
His system required a strong rule in the middle. The ideal leader should stay away from his officials, keep his or her innermost convictions secret, and maintain independence of thought; The leader should be the loneliest person in the world. Shen Buhai saw the biggest threat to the power of a leader coming from within. He believed that threats from powerful independent ministers to take power were more dangerous than threats from outside. Shen defended the concept of shu (術 administrative methods/techniques) and advocated a system of maintaining control against the power of individual officials and equality among officials. Han Fei`s philosophy greatly influenced the first king of Qin and the first emperor of China, Qin Shi Huang, and became one of the guiding principles of the ruler`s policy. After the early demise of the Qin Dynasty, Han Fei`s philosophy was officially vilified by the following Han Dynasty.