Recent studies have highlighted the role of the gut microbiota in type 2 diabetes (T2D). Improving gut microbiota dysbiosis can be a potential strategy for the prevention and management of T2D. Here, this work finds that the abundance of Barnesiella intestinihominis is significantly decreased in the fecal of T2D patients from 2‐independent centers. Oral treatment of live B. intestinihominis (LBI) considerably ameliorates hyperglycemia and liver metabolic disorders in HFD/STZ‐induced T2D models and db/db mice. LBI‐derived acetate has similar protective effects against T2D. Mechanistically, acetate enhances fibroblast growth factor 21 (FGF21) through inhibition of histone deacetylase 9 (HDAC9) to increase H3K27 acetylation at the FGF21 promoter. The screening puerarin from Gegen Qinlian decoction in a gut microbiota‐dependent manner improved hyperglycemia and liver metabolic disorders by promoting the growth of B. intestinihominis. This study suggests that gut commensal B. intestinihominis and puerarin, respectively have the potential as a probiotic and prebiotic in the treatment of T2D.