Fibromyalgia is a chronic syndrome characterized by widespread pain in the absence of evident tissue injury or pathology, making it one of the most mysterious chronic pain conditions. Despite affecting 2–4% of the population, primarily women1, the cause and underlying mechanisms of fibromyalgia remain elusive, and effective targeted treatments are currently unavailable. The gut microbiota of women with fibromyalgia differs from healthy controls2,3. However, it is unknown whether changes in gut microbiota have a causal role in mediating pain and other symptoms of fibromyalgia. Here, we show that fecal microbiota transplantation (FMT) from individuals with fibromyalgia, but not from healthy controls, into germ-free mice induces persistent pain hypersensitivity. FMT from fibromyalgia patients led to a reduction in intraepidermal nerve fiber density and alterations in the peripheral immune profile, and induced activation of spinal microglia, which contributed to the development of pain in mice. Notably, the pain hypersensitivity in mice that were administered microbiota from fibromyalgia patients resolved after FMT from healthy controls. Consistent with these findings, an open-label pilot study showed that transplanting microbiota from healthy individuals to humans with fibromyalgia alleviated pain and reduced overall symptom severity. Thus, altered gut microbiota has a causal role in fibromyalgia pain, highlighting it as a promising target for therapeutic interventions.