Objective: To investigate the effect of transcranial magnetic stimulation (TMS) combined with physical therapy on upper limb function in patients with spastic stroke. Methods: 80 cases of stroke patients in our hospital from January 2018 to January 2020 were selected as the research object, all patients had different parts of spasm phenomenon, the patients were randomly divided into observation group and control group, 40 cases in each group. Patients in the control group were given conventional treatment and rehabilitation training, while patients in the observation group were given rehabilitation training under the mode of low frequency repetitive transcranial stimulation combined with electromyographic biofeedback on the basis of conventional treatment. The treatment effect and the improvement of upper limb function of the two groups were compared. Results: The total effective rate of the observation group was 95.00 %, which was higher than 72.50 % of the control group (P<0.05); before treatment, there was no significant difference in NIHSS, MMSE and ADL scores between the two groups (P>0.05); after treatment, the NIHSS score of the observation group was lower than that of the control group, and the ADL score was higher than that of the control group (P<0.05). Before treatment, there was no significant difference in the RMS of the biceps and triceps of the two groups of patients (P>0.05). After treatment, the RMS of the biceps of the observation group was lower than that of the control group, and the RMS of the triceps was higher than that of the control group (P<0.05); there was no significant difference in FMA-UE and Carroll scores of the two groups before treatment (P>0.05). After treatment, the FMA-UE and Carroll scores of the observation group were higher than those of the control group (P<0.05). Conclusion: Low frequency repetitive transcranial stimulation combined with electromyographic biofeedback rehabilitation training on the basis of conventional treatment and rehabilitation training can improve the treatment effect of upper limb spasm, promote the recovery of upper limb function and improve the ability of life, although it has no obvious effect on the cognitive function of patients, it is worthy of clinical application and promotion. [ABSTRACT FROM AUTHOR]