Necrotizing enterocolitis (NEC) is a common pediatric emergency primarily afflicting preterm infants, yet its mechanisms remain to be fully understood. Here, we report that plasma fibroblast growth factor (FGF)19, a target of farnesoid X receptor (FXR), was positively correlated with the clinical parameters of NEC. NEC patients and the NEC murine model displayed abundant FXR in intestinal epithelial cells (IECs), which was restricted by microbiota-derived short-chain fatty acids (SCFAs) under homeostasis. Genetic deficiency of FXR in IECs caused remission of NEC. Mechanistically, FXR facilitated ferroptosis of IECs via targeting acyl-coenzyme A synthetase long-chain family member 4 (Acsl4). Lipid peroxides released by ferroptotic IECs suppressed interleukin (IL)-22 secretion from type 3 innate lymphoid cells (ILC3s), thereby exacerbating NEC. Intestinal FXR antagonist, ACSL4 inhibitor, and ferroptosis inhibitor ameliorated murine NEC. Furthermore, the elevated lipid peroxides in NEC patients were positively correlated with FGF19 and disease parameters. These observations demonstrate the therapeutic value of targeting intestinal FXR and ferroptosis in NEC treatment.