Migraine is one of the most disabling neurological diseases worldwide; however, the mechanisms underlying migraine headache are still not fully understood and current therapies for such pain are inadequate. It has been suggested that inflammation and neuroimmune modulation in the gastrointestinal tract could play an important role in the pathogenesis of migraine headache, but how gut microbiomes contribute to migraine headache is unclear. In the present study, we investigated the effect of gut microbiota dysbiosis on migraine-like pain using broad-spectrum antibiotics and germ-free (GF) mice. We observed that antibiotics treatment-prolonged nitroglycerin (NTG)-induced acute migraine-like pain in wild-type (WT) mice and the pain prolongation was completely blocked by genetic deletion of tumor necrosis factor-alpha (TNFα) or intra-spinal trigeminal nucleus caudalis (Sp5C) injection of TNFα receptor antagonist. The antibiotics treatment extended NTG-induced TNFα upregulation in the Sp5C. Probiotics administration significantly inhibited the antibiotics-produced migraine-like pain prolongation. Furthermore, NTG-induced migraine-like pain in GF mice was markedly enhanced compared to that in WT mice and gut colonization with fecal microbiota from WT mice robustly reversed microbiota deprivation-caused pain enhancement. Together, our results suggest that gut microbiota dysbiosis contributes to chronicity of migraine-like pain by upregulating TNFα level in the trigeminal nociceptive system.