The COVID-19 pandemic has had a major global impact on the treatment of hospitalized surgical patients. Our study retrospectively evaluates the impact of the COVID-19 pandemic at a neurosurgical reference center in Mexico City. We compared the number of neurosurgeries, the rate and type of postoperative infections, the causative microorganisms and in-hospital mortality rates in a 4-year period, from the pre-pandemic year 2019 until 2022. A total of 4150 neurosurgical procedures were registered. In 2020 the total number of surgeries was reduced by 36% compared to 2019 OR = 0.689 (95% CI 0.566–0.834) p ≤ 0.001, transnasal/trans sphenoidal pituitary resections decreased by 53%, and spinal surgeries by 52%. The rate of neurosurgical infections increased from 3.5% in 2019 to 5.6% in 2020 (p = 0.002). Regarding the microorganisms that caused infections, gram positive cocci accounted for 43.5% of isolates, Klebsiella spp. and Pseudomonas spp. caused one third of the infections. No significant differences were found for in-hospital mortality nor patterns of resistance to antibiotics. The number of surgeries increased in the last two years, although the infection rate has returned to pre-pandemic levels. We observed a lower impact from subsequent waves of COVID-19 and despite an increase in the number of surgeries, the surgeries have not amounted to the full pre-pandemic levels.