PurposeBy serving and providing a guide for other regional places, this study aims to advance and guide the epidemic prevention and control methods, and practices and strengthen people’s ability to respond to COVID-19 and other future potential public health risks.Design/methodology/approachA comparative analysis was conducted that the COVID-19 epidemic development trend and prevention and control effects both in Beijing and Shanghai. In fact, regarding the COVID-19 policy and strategic areas, the differences between governmental, social, and professional management were discussed and explored. To prevent and be ready for potential pandemics, experience and knowledge were used and summarized.FindingsThe strong attack of the Omicron variant in early 2022 has posed challenges to epidemic prevention and control practices in many Chinese cities. Shanghai, which had achieved relatively good performance in the fight against the epidemic, has exposed limitations in its epidemic prevention and control system in the face of Omicron. In fact, the city of Beijing has undertaken prompt and severe lockdown measures and achieved rather good results in epidemic prevention and control because of learning from Shanghai’s experience and lessons; adhering to the overall concept of “dynamic clearing,” implementing precise prevention and monitoring, enhancing community control, and making emergency plans and preparations. All these actions and measures are still essential in the shift from pandemic response to pandemic control.Research limitations/implicationsDifferent places have introduced different urgent policies to control the spread of the pandemic. Strategies to control COVID-19 have often been based on preliminary and limited data and have tended to be slow to evolve as new evidence emerges. Hence, the effects of these anti-epidemic policies need to be further tested.