The central nervous system (CNS) is less prone to infection owing to protection from the brain-blood barrier. However, craniotomy destroys this protection and increases the risk of infection in the brain of patients who have undergone craniotomy. CNS infection after craniotomy significantly increases the patient’s mortality rate and disability. Controlling the occurrence of intracranial infection is very important for post-craniotomy patients. CNS infection after craniotomy is caused by several factors such as preoperative, intraoperative, and post-operative factors. Craniotomy may lead to postsurgical intracranial infection, which is mainly associated with surgery duration, infratentorial (posterior fossa) surgery, cerebrospinal fluid leakage, drainage tube placement, unregulated use of antibiotics, glucocorticoid use, age, diabetes, and other systemic infections. Understanding the risk factors of CNS infection after craniotomy can benefit reducing the incidence of intracranial infectious diseases. This will also provide the necessary guidance and evidence in clinical practice for planning to control intracranial infection in patients with craniotomy.