Many studies report that the rehabilitation after cerebral ischemia influences neural plasticity and improves the functional impairment, but its mechanism is not fully uncovered. The aim of this study is to reveal the detailed mechanisms of functional recovery after the rehabilitation, focusing on the peri-infarct cortex. We induced highly reproducible focal cerebral ischemia in C.B-17/Icr-+/+Jcl mice. These mice were subjected to voluntary running as a rehabilitative exercise. We divided the mice into 4 groups: ① Sham, ② Sham + exercise, ③ Middle cerebral artery occlusion (MCAO), and ④ MCAO + exercise. Voluntary exercise improved functional recovery in grid walking test and wire hang test. The percentage of ipsilateral hemisphere size to the contralateral and the number of NeuN-positive cells in the peri-infarct cortex was not altered by exercise. However, the neuronal morphology in peri-infarct motor cortex layer 5 was changed by exercise. Voluntary exercise suppressed the decrease in the number of dendritic spines after MCAO. Furthermore, voluntary exercise tended to increase the number of c-Fos-labeled cells in the peri-infarct motor cortex layer 5. Our data suggest that voluntary exercise after ischemia alters the morphology of peri-infarct layer 5 neurons, which in turn modifies neuronal activity.