Gamboge is the dry resin secreted by Garcinia hanburyi Hook.f, with the function of promoting blood circulation, detoxification, hemostasis and killing insects, used for the treatment of cancer, brain edema and other diseases. Gambogic acid is the main effective constituent of Gamboge. The present study investigated the protective effects of gambogic acid on spinal cord injury (SCI) and its anti‑inflammatory mechanism in an SCI model in vivo. Basso, Beattie and Bresnahan (BBB) testing was used to detect the protective effects of gambogic acid on nerve function of SCI rats. The water content of the spinal cord was used to analyze the protective effects of gambogic acid on the damage of SCI. Treatment with gambogic acid effectively improved BBB scores and inhibited water content of the spinal cord in SCI rats. Also, gambogic acid significantly reduced inflammatory cytokines levels of [tumor necrosis factor‑α, interleukin (IL)‑6, IL‑12 and IL‑1β] and oxidative stress (malondialdehyde, superoxide dismutase, glutathione and glutathione‑peroxidase) factors, and suppressed receptor activator of nuclear factor κB ligand, phosphorylated p38 protein expression and toll‑like receptor 4/nuclear factor‑κB pathway activation, and increased phosphatidylinositol 3‑kinase/protein kinase B (Akt) pathway activation in SCI rats. These results provide evidence that gambogic acid inhibits SCI and inflammation through suppressing the p38 and Akt signaling pathways.