Postoperative agitation frequently occurs after general anesthesia and may be associated with serious consequences. However, studies in neurosurgical patients have been inadequate. We aimed to investigate the incidence and risk factors for early postoperative agitation in patients after craniotomy, specifically focusing on the association between postoperative pneumocephalus and agitation. Adult intensive care unit admitted patients after elective craniotomy under general anesthesia were consecutively enrolled. Patients were assessed using the Sedation-Agitation Scale during the first 24 hours after operation. The patients were divided into two groups based on their maximal Sedation-Agitation Scale: the agitation (Sedation-Agitation Scale ≥ 5) and non-agitation groups (Sedation-Agitation Scale ≤ 4). Preoperative baseline data, intraoperative and intensive care unit admission data were recorded and analyzed. Each patient’s computed tomography scan obtained within six hours after operation was retrospectively reviewed. Modified Rankin Scale and hospital length of stay after the surgery were also collected. Of the 400 enrolled patients, agitation occurred in 13.0% (95% confidential interval: 9.7–16.3%). Body mass index, total intravenous anesthesia, intraoperative fluid intake, intraoperative bleeding and transfusion, consciousness after operation, endotracheal intubation kept at intensive care unit admission and mechanical ventilation, hyperglycemia without a history of diabetes, self-reported pain and postoperative bi-frontal pneumocephalus were used to build a multivariable model. Bi-frontal pneumocephalus and delayed extubation after the operation were identified as independent risk factors for postoperative agitation. After adjustment for confounding, postoperative agitation was independently associated with worse neurologic outcome (odd ratio: 5.4, 95% confidential interval: 1.1–28.9, P = 0.048). Our results showed that early postoperative agitation was prevalent among post-craniotomy patients and was associated with adverse outcomes. Improvements in clinical strategies relevant to bi-frontal pneumocephalus should be considered.Trial registration: ClinicalTrials.gov (NCT02318199).