Objective To explore the effects of low-frequency transcranial magnetic stimulation combined with cognitive behavioral nursing on sleep structure and emotional regulation in patients with insomnia after stroke. Methods A prospective study was conducted to select 122 stroke patients admitted to Henan Provincial People 's Hospital from June 2023 to October 2024 as the study subjects, and were divided into two groups by random number table method, 61 cases in each group. In the control group, 36 males and 25 females, aged (67.48±10.12) years, with a course of (2.13±0.32) months, were treated with low-frequency transcranial magnetic stimulation. There were 34 males and 27 females in the observation group, aged (67.53±10.13) years old, and the course of disease was (2.07±0.31) months. On the basis of the control group, insomnia cognitive behavioral nursing was combined. Both groups were intervened continuously for 6 weeks. The sleep structure [sleep efficiency (SE), sleep latency (SL), rapid eye movement sleep latency (RL), rapid eye movement sleep time (RT), 1 stage sleep (S1), 2 stage sleep (S2), 3,4 stage sleep (S3, S4), rapid eye movement sleep (R)], sleep quality [Pittsburgh Sleep Quality Index (PSQI)], psychological emotion [Self-rating Anxiety Scale (SAS), Self-rating Depression Scale (SDS)], neurological impairment [National Institutes of Health Stroke Scale (NIHSS)], cognitive impairment [Mini-Mental State Examination (MMSE)] and quality of life [36-Item Short Form Health Survey,Short Form 36 (SF-36)] were compared between the two groups before and after intervention. Statistical methods using t test. Results After intervention, the levels of SE, RT, S3, S4, and R and the scores of MMSE and SF-36 in the observation group were higher than those in the control group [(88.16±13.22)% vs. (72.92±10.94)%, (68.29±10.24) min vs. (52.54±7.88) min, (26.46±3.97)% vs. (21.38±3.21)%, (19.46±2.92)% vs. (16.39±2.46)%, 26.97±4.05 vs. 22.22±3.3, and 88.49±13.27 vs. 74.35±11.15], and the SL, RL, S1, S2 levels and sleep time, sleep quality, sleep time, sleep disorders, sleep efficiency, hypnotic drugs, daytime function, SAS, SDS, NIHSS scores were lower [(11.64±1.75) min vs. (31.35±4.70) min, (118.41±17.76) min vs. (131.36±19.70) min, (12.35±1.85)% vs. (14.44±2.17)%, (41.68±6.25)% vs. (46.47±6.97)%, 0.77±0.12 vs. 0.92±0.14, 1.21±0.18 vs. 1.67±0.25, 0.76±0.11 vs. 1.25±0.19, 0.61±0.09 vs. 0.77±0.12, 0.62±0.09 vs. 0.79±0.12, 0.68±0.10 vs. 0.85±0.13, 1.04±0.16 vs. 1.36±0.20, 44.60±6.69 vs. 51.35±7.70, 43.15±6.47 vs. 50.47±7.57, and 3.88±0.58 vs. 7.74±1.16], with statistical differences (all P<0.05).Conclusions The application of low-frequency transcranial magnetic stimulation combined with cognitive behavioral intervention for insomnia in stroke patients with insomnia is conducive to improving the sleep structure and quality of patients and alleviating their negative emotions. It can also promote the recovery of neurological function and enhance their quality of life.