The mechanisms underlying the potentially beneficial effect of bone marrow stem cells (BMSCs) on spinal cord injury (SCI) are unknown. Therefore, the aim of the present study was to explore the protective effect of BMSCs in rats with SCI. A total of 45 adult male Sprague-Dawley rats were randomly divided into three groups; the SCI group (n=15), the BMSC group (n=15) and the sham-operation group (n=15). In the SCI and BMSC treatment groups, a modified Allen’s weight-drop technique was used to induce SCI. The BMSC treatment group received an injection of BMSCs using a microneedle into the epicenter of the spinal cord 24 h after injury. Rats in the sham-operation group were not subjected to SCI; however, the corresponding vertebral laminae were removed. Seven days after transplantation, a rapid recovery was observed in the Basso, Beattie and Bresnahan (BBB) scores of the BMSC treatment group, whereas the BBB scores in the SCI group remained low (P<0.05). Caspase-12 expression in the SCI group was increased compared with that in the sham-operation group, whereas caspase-12 expression was attenuated 24 h after transplantation in the BMSC treatment group (P<0.05). In conclusion, the transplantation of BMSCs may improve locomotor function and attenuate caspase-12 expression following SCI. Therefore, it is likely to be an effective strategy for preventing severe injury of the spinal cord.