Recurrent Clostridioides difficile infection (rCDI) is a global health threat that has received considerable attention. Berberine (BBR), a natural pentacyclic isoquinoline alkaloid, has been used as a cost-effective treatment for intestinal infections in Asia for many years. However, the effect of BBR on rCDI is not clear. The efficacy and underlying mechanisms of BBR were evaluated in a vancomycin-dependent rCDI mouse model and an intestinal organoids model. The study findings showed that BBR treatment alleviated the severity of infection and increased survival rate in rCDI mice. Mechanistically, BBR alleviated intestinal epithelial damage with higher Occludin expression, suppressed some inflammatory pathways and reduced the level of inflammatory factors in both the caecum and serum. Moreover, 16S rRNA sequencing analysis indicated that BBR reshaped the gut microbiota by increasing the abundance of Firmicutes and reducing the abundance of Proteobacteria. At genus level, BBR treatment increased levels of Blautia and Bilophila, and reduced levels of Proteus. In addition, acetic acid, one of the short-chain fatty acids (SCFAs), was also increased after BBR treatment in rCDI mice. Collectively, BBR exerted a protective effect in rCDI via multiple underlying mechanisms and is a potential drug candidate for alleviating rCDI, but further research is needed in this area.