The spread of COVID-19 is having a serious impact on socioeconomic development, and increased environmental risk perception (ERP). ERP provide new ideas for the orderly recovery of society. However, there have been studies that often pay attention to individual factors, and less concerned about the external environment. In fact, ERP will be affected by the external environment and individual factors. We used a Python script to collect 65,277 valid Weibo comments during the COVID-19 epidemic in China to assess urban residents’ environmental risk perception (ERP). SnowNLP emotion analysis was used to measure the ERP of 366 urban in China, and the structural proportion characteristics and spatial-temporal differentiation of ERP were analyzed. Then, an order logistic regression model was used to investigate the relationship between economic level, social security, medical facilities and ERP. The study investigated the Chinese cities have a higher ERP during the COVID-19 period, and it shows marked fluctuations. As COVID-19 spreads, the ERP shows a distribution pattern of “high in the southeast and low in the northwest” with Hu line as the boundary and “from high to low” with Wuhan as the high value center. COVID-19 serves as catalysts for ERP, the impact of COVID-19 is enhanced after socioeconomic factors are considered. The economic level effectively regulates ERP, except the stage of accelerating diffusion. ERP is effectively stabilized by social security and medical facilities. After considering all the variables simultaneously, we found that the mitigation effect of social security and medical facilities on ERP has improved.