Objectives This study compared the longitudinal change in the mental health of healthcare and non-healthcare workers during two months of the COVID-19 outbreak in Japan. Methods Data were derived from a prospective online cohort study of 1448 full-time employees in Japan. Participants were surveyed at baseline from 19-22 March 2020 (T1) and at follow-up from 22-26 May 2020 (T2). A self-administered online questionnaire was used to assess participants' fear and worry of COVID-19, psychological distress, and physical symptoms at T1 and T2. A series of generalized linear models were created to assess changes in outcomes between healthcare and non-healthcare workers. Demographic variables (ie, sex, age, marital status, child[ren], education, and residential area) were included in the models as covariates. Results A total of 1032 participants completed the follow-up questionnaire at T2 (follow-up rate, 72.6%). After excluding unemployed respondents (N=17), the final sample comprised 1015 full-time employees (111 healthcare and 904 non-healthcare workers). After adjusting for the covariates, psychological distress (and subscales of fatigue, anxiety, and depression) as well as fear and worry of COVID-19 increased statistically significantly more among healthcare than non-healthcare workers from T1 to T2. Conclusions Psychological distress, together with fear and worry of COVID-19, increased more among healthcare compared to non-healthcare workers during the COVID-19 outbreak. The study confirmed that healthcare workers are an important target for mental healthcare during the COVID-19 outbreak.