Betaine serves as an animal and human nutrient which has been heavily investigated in glucose and lipid metabolic regulation, yet the underlying mechanisms are still elusive. In this study, feeding sows with betaine-supplemented diets during pregnancy and lactation increased cholesterol content and low-density lipoprotein receptor (LDLR) and scavenger receptor class B type I (SR-BI) gene expression, but decreasing bile acids content and cholesterol-7a-hydroxylase (CYP7a1) expression in the liver of weaning piglets. This was associated with the significantly elevated serum betaine and methionine levels and hepatic S-adenosylmethionine (SAM) and S-adenosylhomocysteine (SAH) content. Concurrently, the hepatic nuclear transcription factor liver X receptor LXR was downregulated along with activated signal protein AMP-activated protein kinase (AMPK). Moreover, a chromatin immunoprecipitation assay showed lower LXR binding on CYP7a1 gene promoter and more enriched activation histone marker H3K4me3 on LDLR and SR-BI promoters. These results suggest that gestational and lactational betaine supplementation modulates hepatic gene expression involved in cholesterol metabolism via an AMPK/LXR pathway and histone modification in the weaning offspring.