Objective: To observe the clinical effect of Anshen Dingzhi Decoction combined with transcranial magnetic stimulation (TMS) for insomnia of heart-gallbladder qi deficiency type. Methods: A total of 98 cases of insomnia patients of heart-gallbladder qi deficiency type were selected and divided into the control group and the study group according to the random number table method,with 49 cases in each group. The control group was treated with Eszolam Tablets,and the study group was treated with Anshen Dingzhi Decoction combined with TMS. Both groups were treated for four weeks. The clinical effects, traditional Chinese medicine (TCM) syndrome scores,Pittsburgh Sleep Quality Index (PSQI) scores,sleep process parameters,neurotransmitter levels,and incidence of adverse reactions were compared between the two groups. Results:After four weeks of treatment,the total effective rate was 89.80% in the study group, higher than that of 73.47% in the control group (P<0.05). The sleep time, sleep quality, sleep onset time,sleep disorders,sleep efficiency,and daytime dysfunction scores in the two groups were all decreased when compared with those before treatment (P<0.05), and the above six PSQI scores in the study group were lower than those in the control group (P<0.05). The sleep latency,rapid ege movement sleep (REM) latency, and awakening time in the two groups were shortened when compared with those before treatment (P<0.05), and the total sleep time was prolonged when compared with that before treatment (P<0.05), and the sleep efficiency was improved when compared with that before treatment (P<0.05); the sleep latency, REM latency, and awakening time in the study group were shorter than those in the control group (P<0.05),and the total sleep time was longer than that in the control group (P< 0.05),and the sleep efficiency was higher than that in the control group (P<0.05). The main and secondary symptom scores and total scores in the two groups were decreased when compared with those before treatment (P<0.05),and the main and secondary symptom scores and total scores in the study group were lower than those in the control group (P<0.05). The 5-HT levels in the two groups were increased when compared with those before treatment (P<0.05),and the DA levels were decreased when compared with those before treatment (P<0.05); the 5-hydroxytryptamine (5-HT) level in the study group was higher than that in the control group (P<0.05), and the dopamine (DA) level was lower than that in the control group (P<0.05). During treatment, the incidence of adverse reactions was 4.08% in the study group, lower than that of 18.37% in the control group (P<0.05). Conclusion:Anshen Dingzhi Decoction combined with TMS has a good clinical effect in the treatment of insomnia of heart-gallbladder qi deficiency type, which can effectively improve sleep quality,regulate neurotransmitters,and have good safety.