This study evaluated the effect of feeding a control diet (CON) or a moderate energy diet (overfed, OVE) during the dry period (~45. d) and a postpartum intramammary lipopolysaccharide (LPS) challenge on blood metabolic and inflammatory indices, milk production, and hepatic gene expression. A subset of cows (n = 9/diet) in CON (1.34. Mcal/kg of dry matter) and OVE (1.62. Mcal/kg of dry matter) received an intramammary LPS challenge (200. μg; CON-LPS, OVE-LPS, respectively). Liver biopsies were harvested at -14. d from calving, and postpartum at 2.5. h post-LPS on d 7, 14, and 30. Prepartum, the OVE group was in more positive energy balance (EB) and had greater body condition score compared with CON. In contrast, during wk 1 postpartum and before the LPS challenge, the OVE group was in greater negative EB than CON. Prepartal diet did not affect postpartal milk production or dry matter intake. At 2. h postchallenge on d 7, we observed an increase in serum nonesterified fatty acids (NEFA) and bilirubin and a decrease in hydroxybutyrate, regardless of diet. That was coupled with greater haptoglobin in OVE-LPS compared with CON-LPS. In addition, OVE-LPS cows versus CON nonchallenged, OVE nonchallenged, and CON-LPS had greater liver triacylglycerol (TAG) concentration 2.5. h postchallenge on d 7. The concentration of TAG in liver of OVE-LPS remained elevated by 30. d postpartum. The liver TAG concentration in OVE-LPS compared with CON-LPS cows was associated with greater serum concentration of NEFA and reactive oxygen metabolites on d 10 and 14 postpartum. Cows in OVE-LPS also had greater concentrations of ceruloplasmin, cholesterol, and vitamin E from d 10 through 21. Among 28 genes associated with fatty acid oxidation, inflammation, oxidative stress, and gluconeogenesis, only SAA3 (which encodes an acute phase protein) was greater in CON-LPS compared with OVE-LPS at 2.5. h postchallenge. Expression of HP, which encodes another acute phase protein, was greater in OVE-LPS than in CON-LPS at 14 and 30. d postpartum. Several inflammation-related genes (TNF, IRAK1, NFKB1, ANGPTL4) showed markedly decreased expression between 7 and 14. d, after which expression remained unchanged. No differences were observed in several genes of the growth-hormone/insulin-like growth factor-1 axis, except for SOCS2, expression of which decreased markedly between 7 and 14. d in OVE-LPS but not in CON-LPS. These data suggest that overfeeding a moderate-energy diet prepartum alters the response of the cow to an intramammary challenge after calving and may predispose it to sustained liver lipidosis. © 2013 American Dairy Science Association.