Mice fed a high-fat, low-carbohydrate ketogenic diet (KD) exhibit marked changes in hepatic metabolism and energy homeostasis. Here, we identify liver-derived fibroblast growth factor 21 (FGF21) as an endocrine regulator of the ketotic state. Hepatic expression and circulating levels of FGF21 are induced by both KD and fasting, are rapidly suppressed by refeeding, and are in large part downstream of PPARalpha. Importantly, adenoviral knockdown of hepatic FGF21 in KD-fed mice causes fatty liver, lipemia, and reduced serum ketones, due at least in part to altered expression of key genes governing lipid and ketone metabolism. Hence, induction of FGF21 in liver is required for the normal activation of hepatic lipid oxidation, triglyceride clearance, and ketogenesis induced by KD. These findings identify hepatic FGF21 as a critical regulator of lipid homeostasis and identify a physiological role for this hepatic hormone.