The gut microbiota is involved in metabolic and immune disorders associated with obesity and type 2 diabetes. We previously demonstrated that prebiotic treatment may significantly improve host health by modulating bacterial species related to the improvement of gut endocrine, barrier and immune functions. An analysis of the gut metagenome is needed to determine which bacterial functions and taxa are responsible for beneficial microbiota-host interactions upon nutritional intervention. We subjected mice to prebiotic (Pre) treatment under physiological (control diet: CT) and pathological conditions (high-fat diet: HFD) for 8 weeks and investigated the production of intestinal antimicrobial peptides and the gut microbiome. HFD feeding significantly decreased the expression of regenerating islet-derived 3-gamma (Reg3g) and phospholipase A2 group-II (PLA2g2) in the jejunum. Prebiotic treatment increased Reg3g expression (by ∼50-fold) and improved intestinal homeostasis as suggested by the increase in the expression of intectin, a key protein involved in intestinal epithelial cell turnover. Deep metagenomic sequencing analysis revealed that HFD and prebiotic treatment significantly affected the gut microbiome at different taxonomic levels. Functional analyses based on the occurrence of clusters of orthologous groups (COGs) of proteins also revealed distinct profiles for the HFD, Pre, HFD-Pre and CT groups. Finally, the gut microbiota modulations induced by prebiotics counteracted HFD-induced inflammation and related metabolic disorders. Thus, we identified novel putative taxa and metabolic functions that may contribute to the development of or protection against the metabolic alterations observed during HFD feeding and HFD-Pre feeding.