OBJECTIVE: The current study uses the unique setting created by the coronavirus crisis in China during the peak period of the pandemic to examine the behavioral factors affecting the decision of the Chinese people to adopt the precautionary actions recommended by the government. METHODS: Using the social app WeChat, we conducted a cross sectional study of the Chinese people in mid-February 2020. RESULTS: Our results show that higher levels of dispositional optimism and support for the government's actions for managing the epidemic were positively correlated with the compliance level. In addition, women and married participants were more likely to comply with the recommendations. CONCLUSIONS: Optimism and support for government actions should be considered when promoting policies related to health behavior such as social distancing.