For most of the history of China, its legal system has been based on the Confucian philosophy of social control through moral education, as well as the Legalist emphasis on codified law and criminal sanction.
Following the Xinhai Revolution, the Republic of China adopted a largely Western-style legal code in the civil law tradition (specifically German and Swiss based).
The early history Shang Shu recorded the earliest forms of the "five penalties": tattooing, disfigurement, castration, mutilation, and death.
Unlike many other major civilizations where written law was held in honor and often attributed to divine origin, law in early China was viewed in purely secular terms, and its initial appearance was greeted with hostility by Confucian thinkers as indicative of a serious moral decline, a violation of human morality, and even a disturbance of the total cosmic order.
[5] Historically, the people's awareness and acceptance of ethical norms was shaped far more by the pervasive influence of custom and usage of property and by inculcating moral precepts than by any formally enacted system of law.
The onset of the communist period at first rolled back the development of individual rights with the primary concept of law returning to that of a tool of the state.
After the Cultural Revolution devastated the ranks of intellectuals and legal professionals, it took until 1982 for the idea of individual rights to reemerge as a significant influence on Chinese law.
Passage of the Administrative Litigation Law of 1987 created legal recourse for individuals from arbitrary government action, an avenue previously unavailable.
The continuing weakness of courts resulting from their dependence on the local government for financial support and enforcement undermines the effectiveness of these remedies but this has also begun to change with China's initiatives to increase legal training and the professionalism of the judiciary.
This solution by exertion of personal power clearly goes against the idea of rule of law, and worse, some scholars have noted that xìnfǎng today functions more as an informational collection system for the government than an effective review mechanism.
While both theories call for governmental hierarchy, they differ drastically in their views of human potential and the preferred means to achieve political order.
Li is commonly understood as a set of culturally and socially valued norms that provide guidance to proper behaviors that will ultimately lead to a harmonious society.
[8]: 39 In contrast to Confucius' li-based theory, the Legalism advocates the utilization of codified laws and harsh punishment to achieve social order.
To cure this defect and force people to behave morally, the only way, believed the legalists, is to publicly promulgate clearly written laws and impose harsh punishments.
In fact, the Qin emperor implemented strict laws and extremely harsh punishments without taking into account mitigating circumstances even for insignificant crimes.
In summary, although both Confucianism and Legalism were developed in a period of turmoil and both were aimed at the re-unification of the country, the two theories went opposite directions with one advocating for and one against the use of formal laws to achieve social order.
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.
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.
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.
[12]: 118 In the early 1900s, the Qing dynasty's Imperial Recodification Commission prepared a proposed civil code which was significantly influenced by the German and Japanese legal systems.
[12]: 119 After the Communist victory in 1949, the newly established People's Republic of China (PRC) quickly abolished the ROC's legal codes and attempted to create a system of socialist law copied from the Soviet Union.
[citation needed] Since 1979, when the drive to establish a functioning legal system began, more than 300 laws and regulations, most of them in the economic area, have been promulgated.
The use of mediation committees, informed groups of citizens who resolve about 90% of the PRC's civil disputes and some minor criminal cases at no cost to the parties, is one innovative device.
As market reforms have deepened and social inequality has widened, legal forums – ranging from mediation and arbitration commissions to courts – have come to play an increasingly prominent role.
As a result of a trade war with the United States of America over violations of intellectual property rights of American corporations in the early 1990s,[citation needed] the People's Republic of China's trademark law has been modified and as of 1995[update] offers significant protections to foreign trademark-owners.
[21][need quotation to verify] On July 1, 1992, in order to meet growing demand, the Chinese government opened the legal-services market to foreign law-firms, allowing them to establish offices in China when the Ministry of Justice and the State Administration of Industry and Commerce (SAOIC) issued the Provisional Regulation of Establishment of Offices by Foreign Law Firms regulation.
[24]: 227 In 2005, China started implementing legal reform, which revived the Maoist-era ideals adopted during the 1950s due to the position that the law is cold and unresponsive to the needs of its citizens.
[32] Despite the newly elevated role of courts in Chinese society, there still remains some consensus about defects in China's legal system in regards to progressing towards the rule of law.
[13]: 112–113 In his writings on socialist rule of law, Xi has emphasized traditional Chinese concepts including people as the root of the state (mingben), "the ideal of no lawsuit" (tianxia wusong), "respecting rite and stressing law" (longli zhongfa), "virtue first, penalty second" (dezhu xingfu), and "promoting virtue and being prudent in punishment" (mingde shenfa).