Previous studies have demonstrated that repetitive transcranial magnetic stimulation (rTMS) can improve postural control in subacute and chronic ischemic stroke, but further research is needed to investigate the effect of rTMS on acute ischemic stroke. We compared the therapeutic effects of rTMS plus conventional rehabilitation and conventional rehabilitation on postural control in patients with mild hemiparesis in acute ischemic stroke. Eighty-six patients with acute ischemic stroke were randomly assigned to either the experimental group or the control group within 1-7 days of onset. Patients in both groups received conventional rehabilitation for 2 weeks. Patients in the experimental group received rTMS treatments lasting for 2 weeks. Before and after the 2-week treatment, patients were assessed based on the Timed up and Go (TUG) test, Dual-Task Walking (DTW) test, Functional Ambulation Category (FAC), Tinetti Performance Oriented Mobility Assessment (POMA), gait kinematic parameters, Barthel Index (BI), Mini-Mental State Examination (MMSE), Montreal Cognitive Assessment (MoCA), and National Institutes of Health Stroke Scale (NIHSS). Additionally, TUG and single-task gait velocity were assessed at 2 months after the start of treatment, and independent walking recovery was also followed up. After 2 weeks of treatment, compared to conventional rehabilitation, participants who underwent rTMS treatment plus conventional rehabilitation exhibited notable enhancements in TUG, FAC, POMA, and some gait parameters [single-task gait velocity, gait stride length, gait cadence, gait cycle]. Changes in cognitive function partially mediated the improvement in single-task gait velocity and gait stride length by rTMS plus conventional rehabilitation. Generalized Estimating Equation (GEE) analysis showed that the trend of improvement in single-task gait velocity over time was more pronounced in the experimental group than in the control group. The results of the Kaplan-Meier curve indicated a median gait recovery time of 90 days for patients in the experimental group and 100 days for the control group. Multifactorial Cox regression analyses showed that rTMS plus conventional rehabilitation promoted faster recovery of independent walking compared with conventional rehabilitation. rTMS plus conventional rehabilitation outperformed conventional rehabilitation in improving postural control in patients with acute ischemic stroke. Improvements in cognitive function may serve as a mediating factor in the favorable treatment outcome of rTMS plus conventional rehabilitation for improving postural control. https://www.chictr.org.cn, identifier ChiCTR1900026225.