The effect of transcranial magnetic stimulation (TMS) on the neurological functional recovery and expression of c-Fos and brain-derived neurotrophic factor (BDNF) of the cerebral cortex in rats with cerebral infarction was investigated. Cerebral infarction models were established by using left middle cerebral artery occlusion (MCAO) and were randomly divided into a model group (n=40) and a TMS group (n=40). TMS treatment (2 times per day, 30 pulses per time) with a frequency of 0.5 Hz and magnetic field intensity of 1.33 Tesla was carried out in TMS group after MCAO. Modified neurological severity score (NSS) were recorded before and 1, 7, 14, 21, and 28 day(s) after MCAO. The expression of c-Fos and BDNF was immunohistochemically detected 1, 7, 14, 21, and 28 day(s) after infarction respectively. Our results showed that a significant recovery of NSS (P<0.05) was found in animals treated by TMS on day 7, 14, 21, and 28 as compared with the animals in the model group. The positive expression of c-Fos and BDNF was detected in the cortex surrounding the infarction areas, while the expression of c-Fos and BDNF increased significantly in TMS treatment group in comparison with those in model group 7, 14, 21, and 28 days (P<0.05) and 7, 14, 21 days (P<0.01) after infarction, respectively. It is concluded that TMS has therapeutic effect on cerebral infarction and this may have something to do with TMS's ability to promote the expression of c-Fos and BDNF of the cerebral cortex in rats with cerebral infarction.