China has been severely affected by Coronavirus Disease 2019(COVID-19) since December, 2019. We aimed to assess the mental health burden of Chinese public during the outbreak, and to explore the potential influence factors. Using a web-based cross-sectional survey, we collected data from 7,236 self-selected volunteers assessed with demographic information, COVID-19 related knowledge, generalized anxiety disorder (GAD), depressive symptoms, and sleep quality. The overall prevalence of GAD, depressive symptoms, and sleep quality of the public were 35.1%, 20.1%, and 18.2%, respectively. Young people reported a significantly higher prevalence of GAD and depressive symptoms than older people. Compared with other occupational group, healthcare workers were more likely to have poor sleep quality. Multivariate logistic regression showed that age (< 35 years) and time spent focusing on the COVID-19 (≥ 3 hours per day) were associated with GAD, and healthcare workers were at high risk for poor sleep quality. Our study identified a major mental health burden of the public during the COVID-19 outbreak. Young people, people spending too much time thinking about the outbreak, and healthcare workers were at high risk of mental illness. Continuous surveillance of the psychological consequences for outbreaks should become routine as part of preparedness efforts worldwide.