Characterization and functional profiling of the gut microbiota are essential for guiding nutritional interventions in fish and achieving favorable host-microbe interactions. Thus, we conducted a 30 days study to explore and document the gut microbial community ofO. niloticus, as well as to evaluate the effects of a polysaccharide-based prebiotics with 0.5% and 0.75% Aloe vera extract on the gut microbiome through genomic analysis. The V3–V4 region of 16S rRNA was amplified and sequenced using Illumina HiSeq 2500, resulting in 1,000,199 reads for operational taxonomic unit (OTU) identification. Out of 8,894 OTUs, 1,181 were selected for further analysis. Our results revealed that Planctomycetes, Firmicutes, Proteobacteria, Verrucomicrobia, Actinobacteria, and Fusobacteria were the dominant phyla in both control and treatment samples. Higher doses of prebiotics were found to improve Planctomycetes and Firmicutes while decreasing Proteobacteria and Verrucomicrobia. We observed increasing trends in the abundance of Bacilli, Bacillaceae, andBacillusbacteria at the class, family, and genus levels, respectively, in a dose-dependent manner. These findings were consistent with the conventional colony count data, which showed a higher prevalence ofBacillusin prebiotic-supplemented groups. Moreover, predicted functional analysis using PICRUSt indicated a dose-dependent upregulation in glycolysis V, superpathway of glycol metabolism and degradation, glucose and xylose degradation, glycolysis II, and sulfoglycolysis pathways. Most of the energy, protein, and amino acid synthesis pathways were upregulated only at lower doses of prebiotic treatment. Our findings suggest that the gut microbiome ofO. niloticuscan be optimized through nutritional interventions with plant-based polysaccharides for improved growth performance in commercial fish.