Accumulating evidence suggests that natural medicines have notable curative effects on neurological conditions, such as migraine, that are mediated by regulating the gut microbial flora. A natural medicine pair used in traditional Chinese medicine, Blume and (Miq.) Miq. ex Havil. (GU), have shown excellent effect in treating migraine, yet the role of gut microbes in the therapeutic effect of GU in chronic migraine (CMG) is unknown. Here, we performed a 16S rRNA gene sequencing and metabolomics study of the effects of GU in a nitroglycerin (NTG)-induced rat model of CMG. Our results showed that the gut microbial community structure changed significantly and was similar to that of control rats after GU administration in CMG rats. Specifically, GU increased the relative abundance of and and reduced the abundance of _1 and – in CMG rats. The metabolomics profiles of the plasma and ileum contents of CMG rats obtained with an ultra-performance liquid chromatography-mass spectrometer (UPLC-MS) revealed similar biomarkers in both samples, and GU treatment reduced 3-indoxyl sulfate, glutamic acid, -tyrosine, and -arginine levels, and increased 5-HIAA, -tryptophan, and linoleic acid levels in plasma. Correlation analysis showed that the affected bacteria were closely related to amino acid metabolism. Most importantly, GU treatment hardly affected biomarkers in feces samples after inhibiting the activity of gut microbes. Collectively, these findings indicate that structural changes in gut flora are closely related to host metabolism and that regulating the gut microbial community structure and function may be one of the important mechanisms underlying the therapeutic effects of GU in migraine.