Functional constipation (FC) can seriously affect the physical and mental health of children. The goal of this study is to assess the efficacy and safety of Bifidobacterium animalis subsp. lactis XLTG11 in treating FC in children through a randomized, double-blinded, placebo-controlled approach. Eligible children were randomized into either the intervention group (IG, n = 65, receiving conventional treatment with probiotics) or the control group (CG, n = 66, receiving conventional treatment without probiotics). The primary outcome measure was fecal frequency. Fecal gut microbiota analysis and PICRUSt (Phylogenetic Investigation of Communities by Reconstruction of Unobserved States) were used to predict gene family abundances based on 16S information. Over the course of treatment, the weekly frequency of feces within each group increased significantly (F = 41.97, p < 0.001). The frequency of feces (times/week (t/w)) in the IG was significantly higher than that in the CG (3.69 ± 2.62 t/w vs.3.18 ± 1.43 t/w, 4.03 ± 2.54 t/w vs. 2.89 ± 1.39 t/w and 3.74 ± 2.36 t/w vs. 2.94 ± 1.18 t/w and 3.45 ± 1.98 vs. 3.17 ± 1.41 t/w for the 1st, 2nd, 3rd, and 4th week after intervention, respectively) (F = 7.60, p = 0.0067). After the intervention, dominate species shifted to Bifidobacterium longum, Bifidobacterium breve, and Escherichia coli in the IG. Additionally, genes related to short-chain fatty acid (SCF) metabolism were upregulated, while methane metabolism was downregulated. Administration of XLTG11 at a dose of 1 × 1010 CFU/day to children increased fecal frequency, induced beneficial changes in gut microbiota, and regulated SCFs and methane metabolism–related genes.