Migraine is a very common, multifactorial, and recurrent central nervous system disorder that causes throbbing headache, photophobia, phonophobia, nausea, and disability. Migraine occurs more often in females, and its complex physiopathology is not yet fully understood. An increasing number of gastrointestinal disorders have been linked to the occurrence of migraine suggesting that gut microbiota might play a pivotal role in migraine through the gut-brain axis. In the present work, we performed a metagenome-wide association study (MWAS) to determine the relationship between gut microbiota and migraine by analyzing 108 shotgun-sequenced fecal samples obtained from elderly women who suffer from migraine and matched healthy controls. Notably, the alpha diversity was significantly decreased in the migraine group at species, genus, and Kyoto Encyclopedia of Genes and Genomes (KEGG) orthologous levels. Firmicutes, especially the "unfriendly" Clostridium spp., were significantly enriched in the migraine group. Conversely, the healthy controls held more beneficial microorganisms, such as Faecalibacterium prausnitzii, Bifidobacterium adolescentis, and Methanobrevibacter smithii. For functional modules, the migraine group was enriched in gut-brain modules (GBMs) including kynurenine degradation and γ-aminobutyric acid (GABA) synthesis. However, the healthy controls held higher gut metabolic modules (GMMs) including glycolysis, homoacetogenesis, and GBMs including quinolinic acid degradation and S-adenosyl methionine (SAM) synthesis. The differences in gut microbiota composition and function between the migraine and healthy groups provided new information as well as novel therapeutic targets and strategies for migraine treatment, which could help to improve the early diagnosis of the disease, as well as the long-term prognosis and the life quality of patients suffering from migraine.