BackgroundChina implements a comprehensive strategy of rule of law. In December 2019, some unexplained cases of pneumonia were found in Wuhan, Hubei Province. Declared the fight against coronavirus disease in 2019. In this struggle, the rule of law should also be used in the prevention and control of coronavirus diseases. And constantly committed to improving public anxiety and behavior.Research Objects and MethodsIn order to understand how China applies the rule of law in epidemic prevention and control and its benefits, this paper uses the method of literature research to study how China applies the rule of law in epidemic prevention and control before the 2019 coronavirus disease outbreak. There are four epidemic prevention stages from the 2019 coronavirus disease outbreak (December 2019) to November 20211. Articles provided for the study include laws, regulations, government documents, news from national media and other official sources. In order to test the influence of emotional behavior, 60 subjects were used in this study. The stressful life events scale was the adolescent self rating life events check list (ASLEC) compiled by Liu Xianchen. The scale consists of 27 items, and the six dimensions are interpersonal relationship, academic stress, punishment, loss, health adaptation and others. It measures the life events that have brought stress to the subjects in the past six months. The scale adopts Likert 6-point scoring method, and 0 ~ 5 points represent “no occurrence, no influence” to “occurrence and extremely serious influence”. Add the scores of all items. The higher the score, the more stressful life events. Internal consistency of life event scale α The coefficient is 0.876. Pearson correlation, standard deviation and statistical significance were used to illustrate the correlation. Independent sample t-test was used to verify the difference between high anxiety group and low anxiety group. According to the statistical value of anxiety, participants were divided into three groups: low, medium and high anxiety groups. The questionnaire includes two kinds of anxiety, namely debilitating anxiety and promoting anxiety. The relationship between anxiety and self-efficacy of students of different majors and genders was investigated by t-test, univariate, multivariate analysis of variance and regression analysis.ResultsThe research shows that before the outbreak of coronavirus disease in 2019, China's epidemic prevention legal system has laid a solid foundation for combating coronavirus disease in 2019. In the four different stages of epidemic prevention and control, the rule of law lies in the prevention, treatment and control of coronavirus diseases and the punishment of illegal and criminal acts. The political and legal departments also participated in the epidemic prevention and control work together with front-line staff. In addition, the rule of law plays an important role in recovery operations. Public legal services and typical cases guide relevant departments to restore service companies. The public convenience services of the judiciary help people quickly resolve disputes without violating the epidemic prevention and control. In view of the deficiency of epidemic prevention and control, it has improved China's public health legal system and blocked the loopholes in the criminal law of the People's Republic of China (hereinafter referred to as the criminal law). Due to the complexity of coronavirus disease, people were afraid from the beginning. However, the effective application of law and penalty enhances people's confidence in prevention and control. However, there is no public psychological service law in China. The rule of law has supported the decisive achievements of the fight against the novel coronavirus, stabilized social order, and enhanced people's confidence in this fight.ConclusionBefore and after the outbreak of coronavirus disease in 2019, the rule of law is very important for epidemic prevention and control. The rule of law not only helps to eliminate the virus, but also pays attention to the recovery action after the epidemic and new problems in epidemic prevention and control. The main work of the rule of law will change with the development of the epidemic. The application of law or penalty can appease people afterwards, but it is more important to establish a legal system of public psychological services. But what will not change is that epidemic prevention and control should follow the road of the rule of law. In short, the government should be fully aware of the importance of people's emotional factors. Actively improve the surrounding environment, enhance their respective roles, pay special attention to their own standardized language and behavior, and shift from single display to multi-dimensional management, coordination and cooperation. In the process of prevention and control, actively present personalized psychological state to patients, flexibly organize epidemic prevention activities, strive to create a relaxed and harmonious rehabilitation atmosphere, create a friendly and mutual emotional treatment relationship, encourage and guide more, and truly achieve people-oriented, so as to reduce anxiety and adjust the public psychology to the best state.