The COVID-19 pandemic posed a worldwide challenge, leading to radical changes in surgical services. The primary objective of the study was to assess the impact of COVID-19 on elective and emergency surgeries in a Brazilian metropolitan area. The secondary objective was to compare the postoperative hospital mortality before and during the pandemic. Time-series cohort study including data of all patients admitted for elective or emergency surgery at the hospitals in the Public Health System of Federal District, Brazil, between March 2018 and February 2022, using data extracted from the Hospital Information System of Brazilian Ministry of Health (SIH/DATASUS) on September 30, 2022. A causal impact analysis was used to evaluate the impact of COVID-19 on elective and emergency surgeries and hospital mortality. There were 174,473 surgeries during the study period. There was a reduction in overall (absolute effect per week: -227.5; 95% CI: -307.0 to -149.0), elective (absolute effect per week: -170.9; 95% CI: -232.8 to -112.0), and emergency (absolute effect per week: -57.7; 95% CI: -87.5 to -27.7) surgeries during the COVID-19 period. Comparing the surgeries performed before and after the COVID-19 onset, there was an increase in emergency surgeries (53.0% vs 68.8%, P < 0.001) and no significant hospital length of stay (P = 0.112). The effect of the COVID-19 pandemic on postoperative hospital mortality was not statistically significant (absolute effect per week: 2.1, 95% CI: -0.01 to 4.2). Our study showed a reduction in elective and emergency surgeries during the COVID-19 pandemic, possibly due to disruptions in surgical services. These findings highlight that it is crucial to implement effective strategies to prevent the accumulation of surgical waiting lists in times of crisis and improve outcomes for surgical patients.