The coronavirus disease 2019 (COVID-19) pandemic has significantly affected healthcare workers' mental health worldwide, leading to the intention to resign. Japanese medical residents were no exception to the impact of COVID-19. This study aimed to illustrate how the COVID-19 pandemic affected medical residents' intention to resign. A cross-sectional study was conducted for Postgraduate Year (PGY)1-5 medical residents in Japan using an internet survey from March 11 to March 18, 2021. During this survey, the Japanese government declared a second-time state of emergency on January 7, 2021, and all restrictions were expanded nationwide until March 21, 2021. Medical residents were categorized into two groups (intention to resign group [IR] or no intention to resign group [NIR]) based on their intention to resign. Multivariate logistic regression analysis was conducted to elucidate the risk factors for the intention to resign. 354 medical residents were enrolled in this study (response rate: 40.2%). Ninety-two medical residents (26.0 %) were categorized into IR and 262 (74.0%) into NIR. According to multivariate logistic regression analysis, those who did not have mental support at their hospital had 2.95 times greater chance of intending to resign (Adjusted odds ratio [AOR] = 2.95, 95% confidence interval (CI) [1.42-6.15]). Medical residents who engaged in patients with COVID-19 (AOR = 2.13, 95% Cl [1.08-4.18]) and PGY5 (AOR = 3.38, 95% Cl [1.51-7.56]) had a higher likelihood of intending to resign among residents in all PGY. One in four medical residents intended to resign during the COVID-19 pandemic. Particularly, PGY5 and medical residents who treated patients with COVID-19 were found at risk of having the intention to resign. At times of crisis, such as the COVID-19 epidemic, establishing a mental health support system that targets high-risk residents is critical.