Neuroinflammation is a pivotal pathological process in neurological disorders. Microglial pyroptosis, a lytic and inflammatory form of programmed cell death, critically exacerbates neuroinflammation and causes neuronal damage. Macelignan has neuroprotective properties, but its mechanism in regulating microglial pyroptosis remains unclear. This study investigated whether macelignan protects against neuroinflammation by inhibiting microglial pyroptosis via high mobility group box 1 (HMGB1). In vitro, lipopolysaccharide (LPS)-stimulated BV2 microglial cells were treated with macelignan alone or combined with glycyrrhizin (an HMGB1 inhibitor) or disulfiram (a pyroptosis inhibitor). Macelignan suppressed M1 polarization and inflammatory cytokine release, as assessed by CCK-8, ELISA, and morphological analysis. Molecular docking predicted a potential interaction between macelignan and HMGB1. Western blot and immunofluorescence showed that macelignan downregulated HMGB1/TLR4/NLRP3 signaling, inhibited NLRP3 inflammasome activation, caspase-1 cleavage, and GSDMD-mediated pyroptosis, phenocopying glycyrrhizin. In a microglia-neuron co-culture model, conditioned medium from macelignan-treated BV2 cells reduced apoptosis in hippocampal HT22 neurons. In vivo, LPS-injected C57BL/6 mice were treated with low- or high-dose macelignan or glycyrrhizin (positive control). Macelignan attenuated hippocampal pyroptosis and neuronal damage, and behavioral tests revealed improved hippocampal-dependent memory. Collectively, these findings suggest that macelignan alleviates neuroinflammation and cognitive impairment likely by suppressing the HMGB1/NLRP3 axis to inhibit microglial pyroptosis, offering a potential mechanism for its neuroprotective action.