Law came into being in the transitional period from primitive society to slave society. As a tool of political rule, law is a double-edged sword, which has both positive and negative implementation effects. Therefore, it is not enough to affirm or even praise the rule of law only from the perspective of legal value, and it must be explained in its original form, because opponents can also criticize it from its "negative value". In the three generations when the culture of etiquette and music was very developed, the rule of etiquette was the fundamental mode of governing the country, and the law obeyed the etiquette and law, which failed to attract people's attention. However, with the collapse of rites and music at the end of the Spring and Autumn Period, law was separated, independent and dominated, and its positive and negative effects became more and more obvious and gradually attracted the attention of the world, thus entering the field of vision of philosophers. In this case, the philosophical interpretation of the occurrence of law has become one of the focuses of philosophical thinking of pre-Qin philosophers.
Among the pre-Qin philosophers, Legalists held high the banner of the rule of law from beginning to end, Mohism attached importance to the social function of law, and Taoism and Confucianism had a tortuous process from exclusion to affirmation. By clarifying the above basic facts, we can further clearly see that Legalists and Mohists have consciously discussed the origin of law, while Taoists and Confucianists began to think about the origin of law only after acknowledging the rationality of the existence of law. Specifically, the pre-Qin philosophers discussed the causes of law from two dimensions: heaven (Tao and heaven) and man (nature and desire). Their theory of legal genesis can be divided into Tao, Nature of Law, Heaven of Law and Desire of Law. In the process of law formation, saints are endowed with special missions.