Diarrhoea is a common clinical condition; its pathogenesis is strongly associated with gut microbiota dysbiosis. Limonitum is a well-known traditional Chinese medicine that exerts appreciable benefits regarding the amelioration of diarrhoea. However, the mechanism through which Limonitum ameliorates diarrhoea remains unclear. Here, the efficacy and underlying mechanism of Limonitum decoction (LD) regarding diarrhoea were explored from the aspect of gut microbiota. Castor oil (CO) was used to induce diarrhoea in mice, which were then used to evaluate the effects of LD regarding the timing of the first defecation, diarrhoea stool rate, degree of diarrhoea, diarrhoea score, intestinal propulsive rate, and weight of intestinal contents. The concentrations of short-chain fatty acids (SCFAs), including acetic, propionic, isobutyric, butyric and valeric acids, were analysed by gas chromatography-mass spectrometry (GC-MS). The 16S rRNA high-throughput sequencing technology was applied to evaluate changes in the gut microbiota under exposure to LD. LD was found to effectively ameliorate the symptoms of diarrhoea, and the diversity and relative abundance of gut microbiota were restored to normal levels following LD treatment. Additionally, LD significantly restored the observed reductions in SCFAs. These results provide strong evidence that LD can sufficiently ameliorate diarrhoea in mice by regulating their gut microbiota. The findings presented here highlight that Limonitum may constitute a prospective remedy for diarrhoea.