IntroductionIn the wake of the COVID-19 outbreak, urban communities have emerged as the frontline defenders in epidemic prevention and control, providing the most effective means of curbing the spread of virus both inward and outward. This study attempts to explain the underlying factors and mechanisms that shape the community epidemic prevention and control capacity (CEPCC).MethodsWe adopted a resilience-based perspective and drew on a sample of 20 exemplary anti-epidemic communities in China. By constructing an analytical framework and employing the fuzzy set qualitative comparative analysis method (fsQCA), we explored how four conditional variables—infrastructure completeness, community self-organizing ability, redundancy of community resources, and stability of regional economic development—and their various configurations impact the CEPCC.ResultsOur findings reveal that the four conditional variables, when considered in isolation, cannot effectively enhance the CEPCC. Instead, four configuration pathways with mixed conditional variables exist. Notably, community self-organizing ability emerges as a vital condition for effectively strengthening the CEPCC.DiscussionThis study identifies four pathways to improve the CEPCC and confirms the validity of the data results through case studies. Conclusions of this research contribute to a more nuanced understanding of the factors influencing the CEPCC, which can help communities to better plan and prepare for future epidemics and ensure better response and adaptation to the impacts of future emergencies.