Coba jelasin Confucianisation of law dari Undang-undang China dalam bahasa melayu dong

The significant influence of the Legalist tradition in Chinese law has historically been overlooked. Although the Confucian ideology provided the fundamentals for the substance of traditional law, the Legalist school constructed the important framework of the traditional legal system. The Han dynasty retained the basic legal system established under the Qin but modified some of the harsher aspects in line with the Confucian philosophy of social control.

The Han dynasty formally recognized four sources of law: lü (律: "codified laws"), ling (令: "the emperor's order"), ke ("statutes inherited from previous dynasties") and bi ("precedents"), among which ling has the highest binding power over the other three. Most legal professionals were not lawyers but generalists trained in philosophy and literature. The local, classically trained, Confucian gentry played a crucial role as arbiters and handled all but the most serious local disputes.

Eventually, the incorporation of the essentials of Confucianist li into legal codes occurred with this Confucian conception dominating ancient Chinese law. Ch'ü concludes that the gradual process of Confucianisation of law was the most significant development in the legal system of China prior to 20th century modernization. The line between ruling by moral influence and ruling by punishment was not always clearly delineated. For example, li could be enforced by moral influence and legal means. The metamorphosis of li into law depended on its widespread and unvaried acceptance by society.

Although the codification of law was largely completed by the Tang Code of CE 624, throughout the centuries the Confucian foundations of the Tang Code were retained, and indeed with some aspects of it strengthened by the later dynasties.

The Confucian notion that morality and self-discipline was more important than legal codes caused many historians, such as Max Weber, until the mid-20th century to conclude that law was not an important part of Imperial Chinese society.  This notion, however, has come under extreme criticism and is no longer the conventional wisdom among Sinologists, who have concluded that Imperial China had an elaborate system of both criminal and civil law which was comparable to anything found in Europe.

During the Qing dynasty, criminal justice was based on extremely detailed Great Qing Legal Code. One element of the traditional Chinese criminal justice system is the notion that criminal law has a moral purpose, one of which is to get the convicted to repent and see the error of his ways. In the traditional Chinese legal system, a person could not be convicted of a crime unless he has confessed. This often led to the use of torture, in order to extract the necessary confession. These elements still influence modern Chinese views toward law. All capital offenses were reported to the capital and required the personal approval of the emperor.

There was no civil code separate from the criminal code, which led to the now discredited belief that traditional Chinese law had no civil law. More recent studies have demonstrated that most of the magistrates' legal work was in civil disputes, and that there was an elaborate system of civil law which used the criminal code to establish torts.