Nonpharmaceutical interventions (NPIs) for coronavirus disease 2019 (COVID‐19) not only reduce the prevalence of this disease among children but also influence the transmission of other viruses. This retrospective study investigated the impact of NPIs on human enterovirus (HEV) infection in children diagnosed with hand, foot, and mouth disease (HFMD) or herpangina (HA) in Hangzhou, China. We collected and analyzed the laboratory results and clinical data of children diagnosed with HFMD or HA during the following periods: pre‐COVID‐19 (January 2019 to December 2019), the COVID‐19 pandemic (January 2020 to December 2022), and post‐COVID‐19 (January to December 2023). A total of 41 742 specimens that met the inclusion criteria were obtained, of which 1998 (4.79%) tested positive for enterovirus. In comparison to those in the pre‐COVID‐19 period, which had 695 (5.63%) HEV‐positive specimens, the numbers dramatically decreased to 69 (1.19%), 398 (5.12%), and 112 (1.58%) in 2020, 2021, and 2022, respectively, but significantly increased to 724 (8.27%) in 2023. Seasonal peaks of infections occurred in May, June, July, and August each year, with the total detection rate ranging from 2019 to 2023 being 9.41% in May, 22.47% in June, 28.23% in July, and 12.16% in August, respectively. The difference in the detection rates of HEV infection between males and females was statistically significant (p < 0.005), with 5.11% (1221/23 898) of males and 4.35% (777/17 844) of females testing positive, resulting in a male‐to‐female positive ratio of 1.57:1. Among the age groups, 11.25% (378/3360) of the children aged 3–5 years had the highest detection rate, which steadily decreased with increasing or decreasing age. The detection of HEV indicated that >95% of the viruses were other types than the previously commonly reported enterovirus 71 (EV‐A71) and coxsackievirus A16 (CV‐A16). In conclusion, NPIs for COVID‐19 may be effective at reducing the transmission of HEV. However, with the relaxation of NPIs, the detection rate of HEVs increased slowly to a certain extent. Active awareness and surveillance of the epidemiological characteristics of HEV are essential for preventing, controlling, and managing the development of HFMD and HA, as well as contributing to the development of a multivalent HFMD vaccine.