Recently, the role of the gut microbiota in the context of drug addiction has attracted the attention of researchers; however, the specific effects and underlying mechanisms require further exploration. To accomplish this, C57BL/6 mice were firstly treated with methamphetamine (MA). Conditioned place preference (CPP) behavior changes, gut permeability and function, microglial activation, and inflammatory cytokine expression were systematically analyzed in antibiotics-treated mice with microbiota depletion and in fecal microbiota transplantation mice with microbiota reconstitution. MA treatment altered microbiota composition and caused gut dysbiosis. Depletion of gut microbiota with antibiotics inhibited MA-induced CPP formation, and fecal microbiota transplantation reversed this inhibition. Mechanistic analyses indicated that antibiotic treatment decreased gut permeability and neuroinflammation, while fecal microbiota transplantation offset the impact of antibiotic treatment. Additionally, MA-induced microglial activation was suppressed by antibiotics but restored by microbiota transplantation, and this correlated well with the CPP score. Compared to antibiotic treatment, microbiota transplantation significantly increased 5-HT4 receptor expression in both the nucleus accumbens and the hippocampus. Furthermore, when fecal microbiota from healthy mice was transplanted into MA-treated mice, the CPP scores decreased. Our results provide a novel avenue for understanding MA addiction and suggest a potential future intervention strategy.