Collectively, we identify an HNF4α-TET2-FBP1 axis in the control of gluconeogenesis, which contributes to the therapeutic effect of metformin on T2D and provides a potential target for the clinical treatment of T2D. Here, HNF4A is linked to type 2 diabetes mellitus.