Metformin is the most widely used anti-diabetic medication worldwide. However, human and animal studies suggest that prenatal metformin exposure may increase the risk of metabolic disorders in adult offspring, yet the underpinning mechanism remains unclear. Here we report that metformin-exposed mouse fetuses exhibit elevated expression of the H19 long noncoding RNA, which induces hypomethylation and increased expression of hepatocyte nuclear factor 4α (HNF4α). As a transcription factor essential for morphological and functional differentiation of hepatocytes, HNF4α also has an indispensable role in the regulation of expression of gluconeogenic genes. Consistently, H19 overexpression in a human liver cell line leads to decreased methylation and increased expression of Hnf4α, with concomitant activation of the gluconeogenic program. Mechanistically, we show that the methylation change of Hnf4α is induced by H19-mediated regulation of S-adenosylhomocysteine hydrolase. We also provide evidence that altered H19 expression is a direct effect of metformin in the fetal liver. Our results suggest that metformin from the mother can directly act upon the fetal liver to modify Hnf4α expression, a key factor for both liver development and function, and that perturbation of this H19/Hnf4α-mediated pathway may contribute to the fetal origin of adult metabolic abnormalities.