To investigate the effect of hydrogen gas on NOD-like receptor protein 3 (NLRP3) inflammasomes in the cerebral cortex of rats with traumatic brain injury (TBI). 120 adult male Sprague-Dawley (SD) rates were randomly divided into 5 groups (n = 24): sham operation group (S group), TBI model group (T group), TBI+NLRP3 inhibitor MCC950 group (T+M group), TBI+hydrogen gas group (T+H group), TBI+hydrogen gas+MCC950 group (T+H+M group). TBI model was established by controlled cortical impact. NLRP3 inhibitor MCC950 (10 mg/kg) was intraperitoneally injected for 14 consecutive days before TBI operation in T+M and T+H+M groups. 2% hydrogen inhalation was given for 1 hour at 1 hour and 3 hours after TBI operation in T+H and T+H+M groups. At 6 hours after TBI operation, the pericontusional cortex tissues were obtained, the content of Evans blue (EB) was detected to evaluate the permeability of the blood-brain barrier. Water content in brain tissue was detected. The cell apoptosis was detected by TdT-mediated dUTP nick end labeling (TUNEL) and the neuronal apoptosis index was calculated. The expressions of Bcl-2, Bax, NLRP3, apoptosis-associated speck-like protein containing CARD (ASC) and caspase-1 p20 were detected by Western blotting. The levels of interleukins (IL-1β, IL-18) were detected by enzyme-linked immunosorbent assay (ELISA). Compared with the S group, the content of EB in cerebral cortex, water content in brain tissue, apoptosis index and the expressions of Bax, NLRP3, ASC, caspase-1 p20 in T group were significantly increased, the expression of Bcl-2 was down-regulated, the levels of IL-1β and IL-18 were increased [the content of EB (μg/g): 87.57±6.89 vs. 10.54±1.15, water content in brain tissues: (83.79±2.74)% vs. (74.50±1.19)%, apoptotic index: (62.66±5.33)% vs. (4.61±0.96)%, Bax/β-actin: 4.20±0.44 vs. 1, NLRP3/β-actin: 3.55±0.31 vs. 1, ASC/β-actin: 3.10±0.26 vs. 1, caspase-1 p20/β-actin: 3.28±0.24 vs. 1, Bcl-2/β-actin: 0.23±0.03 vs. 1, IL-1β (ng/g): 221.58±19.15 vs. 27.15±3.27, IL-18 (ng/g): 87.26±7.17 vs. 12.10±1.85, all P < 0.05]. Compared with the T group, the T+M, T+H and T+H+M groups had significant reductions in the content of EB and water content in brain tissue, apoptotic index of the cerebral cortex, the expressions of Bax, NLRP3, and caspase-1 p20 in the brain tissue and the levels of IL-1β and IL-18, significant increases in the expression of Bcl-2. However, there was no significant difference in ASC expression. Compared with the T+H group, the content of EB in the cerebral cortex, water content in brain tissue, and apoptotic index, and the expressions of Bax, NLRP3 and caspase-1 p20 were further down-regulated in T+H+M group, the expression of Bcl-2 was further up-regulated, the levels of IL-1β and IL-18 were further decreased [the content of EB (μg/g): 40.49±3.15 vs. 51.96±4.69, water content in brain tissue: (76.58±1.04)% vs. (78.76±1.16)%, apoptotic index: (32.22±3.44)% vs. (38.54±3.89)%, Bax/β-actin: 1.92±0.16 vs. 2.56±0.21, NLRP3/β-actin: 1.94±0.14 vs. 2.37±0.24, caspase-1 p20/β-actin: 1.97±0.17 vs. 2.31±0.19, Bcl-2/β-actin: 0.82±0.07 vs. 0.52±0.04, IL-1β (ng/g): 86.23±7.09 vs. 110.44±10.48, IL-18 (ng/g): 40.18±3.22 vs. 46.23±4.02, all P < 0.05], but there were no statistical significance in all the indicators between T+M group and T+H group. The mechanism by which hydrogen gas alleviates TBI may be related to inhibiting NLRP3 inflammasomes in the cerebral cortex of rats.