Subarachnoid hemorrhage (SAH) carries a 50% mortality rate. The extravasated erythrocytes that surround the brain contain heme, which, when released from damaged red blood cells, functions as a potent danger molecule that induces sterile tissue injury and organ dysfunction. Free heme is metabolized by heme oxygenase (HO), resulting in the generation of carbon monoxide (CO), a bioactive gas with potent immunomodulatory capabilities. Here, using a murine model of SAH, we demonstrated that expression of the inducible HO isoform (HO-1, encoded by Hmox1) in microglia is necessary to attenuate neuronal cell death, vasospasm, impaired cognitive function, and clearance of cerebral blood burden. Initiation of CO inhalation after SAH rescued the absence of microglial HO-1 and reduced injury by enhancing erythrophagocytosis. Evaluation of correlative human data revealed that patients with SAH have markedly higher HO-1 activity in cerebrospinal fluid (CSF) compared with that in patients with unruptured cerebral aneurysms. Furthermore, cisternal hematoma volume correlated with HO-1 activity and cytokine expression in the CSF of these patients. Collectively, we found that microglial HO-1 and the generation of CO are essential for effective elimination of blood and heme after SAH that otherwise leads to neuronal injury and cognitive dysfunction. Administration of CO may have potential as a therapeutic modality in patients with ruptured cerebral aneurysms.