Purpose Analysis of routine biochemical levels of cerebrospinal fluid (CSF), distribution of pathogenic bacteria, and risk factors in patients with intracranial infections secondary to brain tumour surgery. Methods A total of 208 patients admitted to our hospital for brain tumour surgery from January 2020 to May 2022 were selected. Fully automated biochemical analyzer was employed for CSF routine and for measuring biochemical parameters such as white blood cell (WBC), micrototal protein (M-TP), glucose (GLU), and chlorine (CI). Double antibody sandwich assay for CSF procalcitonin (PCT), heparin-binding protein (HBP), and matrix metalloproteinase-9 (MMP-9) was performed. Fully automated microbiological analyzer for pathogen identification was utilized. Based on the above results, we determined whether the patients had secondary intracranial infections after surgery and analyzed the risk factors for secondary intracranial infections after brain tumour surgery by univariate and multifactorial logistic regression. Results Among 208 patients with brain tumour surgery, 65 cases (31.25%) had secondary intracranial infection and 143 cases (68.75%) had no secondary intracranial infection. The levels of WBC, M-TP, CI, PCT, HBP, and MMP-9 in the CSF of intracranially infected patients were significantly higher than those of uninfected patients (P < 0.05), and GLU was significantly lower than that of uninfected patients (P < 0.05), and the levels of PCT, HBP, and MMP-9 in infected patients were significantly lower than those before treatment after 3, 7, and 10 d and tended to decrease over time (P < 0.05). A total of 62 pathogenic strains were isolated from 65 intracranial infections, of which 41 (66.13%) were Gram-negative bacteria, mainly resistant to amikacin and ciprofloxacin and sensitive to meropenem and imipenem; 19 (30.65%) were Gram-positive bacteria, mainly highly resistant to penicillin and erythromycin and sensitive to vancomycin. Univariate analysis showed that age, gender, tumour type, history of glucocorticoid application, and prophylactic application of antibiotics were not associated with secondary intracranial infection after brain tumour surgery (P > 0.05); tumour site, operation time, postoperative indwelling drainage time, postoperative cerebrospinal fluid leakage, and history of diabetics were all associated with secondary intracranial infection after brain tumour surgery (P < 0.05). Multivariate logistic regression analysis showed that infratentorial tumour, operation time ≥4 h, postoperative indwelling drainage time ≥24 h, and postoperative cerebrospinal fluid leakage were independent risk factors for secondary intracranial infection after brain tumour surgery (P < 0.05). Conclusion Patients with intracranial infections secondary to brain tumour surgery have abnormal levels of CSF routine and biochemical parameters, and the detection rate of Gram-negative bacteria is higher than that of Gram-positive bacteria in patients. Treatment should be based on the characteristics of pathogenic bacteria and risk factors with targeted interventions to reduce intracranial infections.