This research aimed to investigate the therapeutic effects of transplanted human umbilical cord mesenchymal stem cells (hUCMSCs) on spinal cord injury in mice and to explore its molecular mechanism. Spinal cord injury model in C57BL/6J mice was established. On the 10th day of SCI, hUCMSCs were injected into the center of spinal cord injury area (hUCMSC), and control groups (Control) were injected with an equal amount of medium. Western blotting, Real Time-PCR, immunohistochemistry, and flow cytometry, were used to analyze the content of IL-7, inflammatory cytokines, and macrophages after spinal cord injury in different groups. Open field and Rota-Rod tests were used to determine the effect of hUCMSC transplantation on motor function recovery in SCI mice. Compared with the control mice, hUCMSC transplantation therapy significantly improved the motor function, myelin, and nerve cell survival in spinal cord injury site in SCI mice. It also reduced the expression of IL-7, IFN-γ, and TNF-α in injured sites but increased IL-4 and IL-13 expression and promoted the activation of M2 macrophages at the site of injury. Transplantation of hUCMSCs in SCI mice can promote the polarization of M2 macrophages by reducing the expression of IL-7 in the injured site, thereby weakening the inflammatory response at the injured site, promoting the repair of the injured site and improving the motor function.