ObjectiveTo examine trends in patient and visitor violence (PVV) among large public hospitals from 2016 to 2020 in China, and investigate the effects of infection prevention and control (IPC) measures on PVV during the COVID-19 pandemic.MethodsThe hospital-level data of PVV used in this study from 2016 to 2020 in three cities in northern China were extracted from the database of the Medical Quality and Safety Notification System from 41 public hospitals. The difference-in-difference (DID) method was used to estimate the effects of IPC measures on PVV. The empirical strategy was to compare changes in the incidence rate of PVV in public hospitals where IPC measures were stricter to relatively weaker hospitals.ResultsFrom 2019 to 2020, the incidence rate of PVV decreases from 4.59 to 2.15% for high-IPC measure level hospitals and increases from 4.42 to 4.56% for medium-IPC measure level hospitals. The results from the DID models showed that as the IPC measure level increased, the incidence rate of PVV (β= −3.12, 95% CI = −5.74 ~ −0.50) decreased more significantly based on controlling for hospital fixed effects and time trends.ConclusionThe multi-dimensional and comprehensive IPC measures throughout the pandemic in China have not only controlled the pandemic, but also directly or indirectly reduced the incidence rate of PVV by alleviating the stress of health workers and the crowded working environment, creating a good order of admission, and reducing patient waiting time.