Repetitive transcranial magnetic stimulation combined with motor training effectively promotes motor recovery in stroke patients. However, its underlying neurophysiological mechanisms remain unclear. Existing single-modal neuroimaging techniques are limited by the incapacity to fully characterize the neural mechanisms of combined interventions. To address the above problem, this paper proposed an optimized decomposition method for dynamic brain functional networks based on electroencephalography and functional near-infrared spectroscopy, in order to reveal the potential neural mechanisms underlying the improvement of motor function in stroke patients through combined repetitive transcranial magnetic stimulation and motor training from a multimodal perspective. Twenty-seven stroke patients were recruited to participate in a clinical trial for this study. The results showed that the real stimulation group exhibited significantly increased flexibility in the frontoparietal network after intervention, with the magnitude of change significantly correlated with clinical improvement, whereas no significant changes were observed in the sham stimulation group. In conclusion, this study reveals the brain functional rehabilitation mechanism under combined intervention, contributing to the development of personalized rehabilitation strategies.