Coronavirus disease 2019 (COVID-19) has influenced and is still influencing people’s daily lives worldwide. The infection rate and health and safety countermeasures may influence people’s epidemic risk perception, thus influencing their travel mode choice. It is critical to understand epidemic risk perception and its impact on travel mode choice behavior to ensure the timeliness and effectiveness of health and safety policy implementation. In this study, we conducted an online survey to investigate how commuters’ epidemic risk perception affects travel mode choice behavior in Shenzhen. The online survey mainly includes Likert scale questions and a stated preference experiment with three scenarios to capture commuters’ epidemic risk perceptions and travel mode choice behaviors. First, confirmatory factor analysis was used to obtain three dimensions of epidemic risk perception from the Likert scale questions. Then, three subpopulation groups, including risk-sensitive commuters, risk-insensitive commuters and cautious commuters, were classified based on their risk perception using clustering analysis. Finally, a latent class choice model was estimated to capture the influencing factors of mode choice behavior. Three classes of mode choice behavior were identified, including those who can accept using public transportation, those who avoid using public transportation and tend to bicycles/electric bicycles and those who avoid using public transportation and tend to personal cars. The obtained results can provide valuable support for decision-making during and after an epidemic. Firstly, by offering insights into the intricate risk perception characteristics of Shenzhen residents, these findings can contribute to the effective management of epidemic risks during an epidemic. Secondly, by revealing the factors that influence individuals' preferences for travel modes, these results play a pivotal role in enhancing the market share of the public transportation system after the epidemic.