This study explores the relationships among the variables: willingness to quarantine, perception of the epidemic, willingness to do outdoor activities, government credibility, and public morality . To understand these relationships, it integrates theories including epidemic prevention and control, government credibility, public morality, and social network systems . Structural equation modeling (SEM) with bootstrapping estimation was conducted using data calculated from 368 healthy citizens who are quarantining at home due to COVID-19 in Chinese cities that have launched a first-level primary public safety incident response . The results show that residents ’ perception of the epidemic has a positive effect on their willingness to quarantine, and willingness to do outdoor activities has a negative effect . Moreover, government credibility and public morality have a mediating effect on the relationship between the perception of epidemic and willingness to quarantine . What is more, government credibility has a moderating effect on the relationship between willingness to do outdoor activities and willingness to quarantine . We discuss the implications of these results for beating future epidemics that may break out.