Microglia‐mediated neuroinflammatory responses have a critical function in the spinal cord injury (SCI) mechanism, and targeted modulation of microglia activity has emerged as a new therapeutic strategy for SCI. Heme oxygenase 1(HO‐1) regulates the close dynamic crosstalk between oxidative stress and inflammatory responses. This investigation aimed to study the molecular pathways by which HO‐1 regulates the inflammatory response of microglia. We cultivated primary rat spinal cord microglia and BV2 cell lines and used lipopolysaccharide (LPS) to stimulate microglia to establish an in vitro model. The adeno‐associated virus (AAV) was used to induce HO‐1 overexpression to observe the effects of HO‐1 overexpression on microglia survival, morphological changes, microglia activation, inflammatory cytokines secretion, mitochondrial dynamics, and nucleotide‐binding oligomerization domain‐like receptor protein (NLRP3) inflammatory complex and nuclear factor‐κB (NF‐κB) signaling pathways. It was found that HO‐1 overexpression was successfully induced using an AAV on microglia in vitro. HO‐1 overexpression increased microglia survival and reduced microglia apoptosis in the inflammatory microenvironment. Overexpressed HO‐1 inhibited microglia M1‐type polarization, downregulated the NF‐κB signaling pathway, inhibited NLRP3 inflammatory complex activation, and reduced the secretion of inflammatory factors. Overexpressed HO‐1 maintained the stability of mitochondrial dynamics and inhibited excessive mitochondrial cleavage. Further experiments showed that overexpression of HO‐1 activated the interferon regulatory factor 1 (IRF1)/dynamin‐related protein 1 (DRP1) signaling pathway, thereby promoting microglia M2‐type polarization and improving neuronal survival. This study demonstrates that HO‐1 activates the IRF1/DRP1 axis, promoting M2 polarization in microglia and attenuating neuroinflammation by suppressing the NF‐κB signaling pathway. These outcomes offer new visions and important clues for effectively managing SCI in the clinic.