Transcranial alternating current stimulation (tACS) holds significant potential for improving motor function in stroke patients, but its underlying mechanisms remain unclear. In this study, 20 Hz tACS was applied to 15 stroke patients, and their motor imagery (MI) signals were collected before and after stimulation, which were for assessment by combining with the Fugl-Meyer Assessment for Upper Extremity (FMA-UE). Additionally, 11 subjects were recruited as a healthy control group. The study demonstrated that FMA-UE scores of stroke patients significantly increased after tACS intervention. The duration of EEG microstate C and F decreased significantly, while microstate D (coverage, duration, and occurrence probability) increased markedly, and microstate E decreased. The transition probabilities of C→D and D→B were positively correlated with FMA-UE scores. Based on these findings, this study concludes that 20 Hz tACS can enhance neuroplasticity and motor function in patients, and the transition probabilities (C→D/D→B) may serve as potential indicators for assessing motor function, providing experimental evidence for the clinical application of tACS and the development of rehabilitation brain-computer interfaces.