The clinical application of hyperbaric oxygen therapy (HBOT) in spinal cord injury (SCI) has been reported, however the mechanism underlying its therapeutic effects remains to be elucidated. In the present study, SCI was modeled in male Sprague‑Dawley rats. A total of 120 rats were randomly divided into four groups: Sham‑operated group (SH); sham‑operated and hyperbaric oxygen group (SH+HBO); spinal cord injury group (SCI) and spinal cord injury and hyperbaric oxygen treatment group (SCI+HBO). The rats in each group were randomly divided into five smaller groups (12 h, 1, 3, 7 and 14 days after surgery). The mRNA and protein expression levels of NACHT domain‑, leucine‑rich‑repeat‑ and pyrin domain‑containing protein 3 (NALP3) inflammasome, including NALP3, adaptor molecule apoptosis‑associated speck‑like protein (ASC) and caspase‑1 were determined at several time points following injury. The results of the present study demonstrated that HBOT compromised the mRNA and protein expression levels of NALP3, ASC and caspase‑1 in the SCI model rats and HBOT mitigated SCI‑induced interleukin 1β release in the injured spinal cord tissue. It was concluded that HBOT is an effective approach, which can prevent against spinal cord injury, likely by inactivating NALP3 inflammasome.