Exercise training is a traditional method to maximize remaining function in patients with spinal cord injury (SCI), but the exact mechanism by which exercise promotes recovery after SCI has not been identified; whether exercise truly has a beneficial effect on SCI also remains unclear. Previously, we showed that epigenetic changes in the brain motor cortex occur after SCI and that a treatment leading to epigenetic modulation effectively promotes functional recovery after SCI. We aimed to determine how exercise induces functional improvement in rats subjected to SCI and whether epigenetic changes are engaged in the effects of exercise. A spinal cord contusion model was established in rats, which were then subjected to treadmill exercise for 12 weeks. We found that the size of the lesion cavity and the number of macrophages were decreased more in the exercise group than in the control group after 12 weeks of injury. Immunofluorescence and DNA dot blot analysis revealed that levels of 5-methylcytosine (5mC) and 5-hydroxymethylcytosine (5hmC) in the brain motor cortex were increased after exercise. Accordingly, the expression of ten-eleven translocation (Tet) family members (Tet1, Tet2, and Tet3) in the brain motor cortex also elevated. However, no macrophage polarization was induced by exercise. Locomotor function, including Basso, Beattie, and Bresnahan (BBB) and ladder scores, also improved in the exercise group compared to the control group. We concluded that treadmill exercise facilitates functional recovery in rats with SCI, and mechanistically epigenetic changes in the brain motor cortex may contribute to exercise-induced improvements.