To determine whether the traditional Chinese herbal formula of Shen Ling Baizhu (SLB) could modulate the composition of the gut microbiota and alleviate diarrhoea in suckling piglets, twenty-four newly born piglets (Large White × Landrace × Duroc) were selected and allocated to 4 groups (control group and experimental groups I, II, and III) randomly. Faecal microbiome composition was assessed by 16S rRNA gene 454-pyrosequencing. The result indicated that experimental groups I and II exhibited significantly different gut microbiota from the control group. Most notably, the genera Lactobacillus and Bifidobacterium were significantly elevated in experimental group II compared with the control group (P < 0.05). Collinsella and Faecalibacterium were also enhanced in experimental group II compared with the control group (P < 0.05). The results showed that SLB treatment could modulate the gut microbiota composition of suckling piglets, enriching the amount of beneficial bacteria in particular. The observed changes in the gut microbiota could provide the basis for further research on the pharmacological mechanism of the tested Chinese herbal formula.