Background The novel coronavirus (SARS-CoV-2) has infected a large number of healthcare workers in Hubei province, China. In addition to infectious and respiratory disease physicians, many doctors in other medical fields have been infected. Methods We prospectively collected epidemiological data on medical staff members who are working in neurosurgery departments in 107 hospitals in Hubei province through self-reported questionnaires or telephone interviews. Data of medical staff members with laboratory-confirmed coronavirus disease 2019 (COVID-19) were analysed. The final follow-up date was 1 March 2020. Findings A total of 5,442 neurosurgery department medical staff members were surveyed. One hundred and twenty cases, involving 54 doctors and 66 nurses, were found to have been infected with SARS-CoV-2. The overall incidence was 2.2%. These cases were concentrated in 26 centres, 16 of which had admitted a total of 59 patients with COVID-19 complicated by craniocerebral disease. Medical staff members in centres receiving COVID-19 patients had a higher risk of contracting infection than those in centres not receiving COVID-19 patients (relative risk: 19.6; 95% confidence interval: 12.6-30.6). Contact with either COVID-19 patients (62.5%, 75/120) or infected colleagues (30.8%, 37/120) was the most common mode of transmission. About 78.3% (94/120) of the infected cases wore surgical masks, whereas 20.8% (25/120) failed to use protection when exposed to the source of infection. Severe infections were observed in 11.7% (14/120) of the cases, with one death (0.8%, 1/120). All the infected medical staff members had been discharged from the hospital. A total of 1,287 medical staff members were dispatched to participate in the frontline response to COVID-19 under level 2 protection of whom one was infected. Medical staff members who took inadequate protection had a higher risk of contracting infection than those using level 2 protection (relative risk: 36.9; 95% confidence interval: 5.2-263.6). Interpretation Neurosurgical staff members in Hubei province were seriously affected by COVID-19. Level 2 protection and strengthening of protective measures are likely to be effective in preventing medical workers from being infected.