The present study evaluated the anti-inflammatory effect of microRNA (miR)-146a in a spinal cord injury (SCI) rat model and in vitro model, and explored possible underlying mechanisms of this effect. miR-146a expression was analyzed using reverse transcription-quantitative polymerase chain reaction (RT-qPCR). Tumor necrosis factor (TNF)-α, interleukin (IL)-1β and IL-6 content was measured using ELISA kits. Inducible nitric oxide synthase (iNOS), prostaglandin E2 (PGE2), Toll-like receptor 4 (TLR4), myeloid differentiation primary response 88 (MyD88) and phosphorylated (p)-nuclear factor (NF)-κB were measured using western blotting. In the SCI rat model, miR-146a expression was downregulated. In the in vitro model, downregulation of miR-146a increased inflammation, enhanced iNOS and PGE2 protein expression and induced TLR4, MyD88 and NF-κB expression. Overexpression of miR-146a reduced inflammation, iNOS and PGE2 protein expression, and suppressed TLR4, MyD88 and NF-κB expression in the in vitro SCI model. The inhibition of TLR4 attenuated the proinflammatory effects of anti-miR-146a in the in vitro SCI model. The results indicate that miR-146a reduces inflammation in an SCI model through the TLR4-NF-κB signaling pathway. The present study demonstrated that miR-146a may be a promising therapeutic agent for SCI.