Childhood obesity presents a serious health concern associated with gut microbiota alterations. Dietary interventions targeting the gut microbiota have emerged as promising strategies for managing obesity in children. This study aimed to elucidate the impact of stachyose (STS) supplementation on the gut microbiota composition and metabolic processes in obese children. Fecal samples were collected from 40 obese children (20 boys and 20 girls) aged between 6 and 15 and in vitro fermentation was conducted with or without the addition of STS, respectively, followed by 16S rRNA amplicon sequencing and analysis of short-chain fatty acids (SCFAs) and gases. Notably, our results revealed that STS supplementation led to significant alterations in gut microbiota composition, including an increase in the abundance of beneficial bacteria such as Bifidobacterium and Faecalibacterium, and a decrease in harmful bacteria including Escherichia-Shigella, Parabacteroides, Eggerthella, and Flavonifractor. Moreover, STS supplementation resulted in changes in SCFAs production, with significant increases in acetate levels and reductions in propionate and propionate, while simultaneously reducing the generation of gases such as H2S, H2, and NH3. The Area Under the Curve (AUC)-Random Forest algorithm and PICRUSt 2 were employed to identify valuable biomarkers and predict associations between the gut microbiota, metabolites, and metabolic pathways. The results not only contribute to the elucidation of STS’s modulatory effects on gut microbiota but also underscore its potential in shaping metabolic activities within the gastrointestinal environment. Furthermore, our study underscores the significance of personalized nutrition interventions, particularly utilizing STS supplementation, in the management of childhood obesity through targeted modulation of gut microbial ecology and metabolic function.