Background: Dietary intervention is an important approach to improve intestinal function of weaned piglets. Phytogenic and herbal products have received increasing attention as in-feed antibiotic alternatives. This study investigated the chemical composition of guava leaf extract (GE) by ultrahigh-performance liquid chromatography-tandem mass spectrometry (UPLC-MS/MS). Meanwhile, we investigated the effects of dietary supplementation with GE on diarrhea in relation to immune responses and intestinal health in weaned piglets challenged by enterotoxigenic Escherichia coli (ETEC)., Results: In total, 323 characterized compounds, which including 91 phenolic compounds and 232 other compounds were identified. Animal experiment results showed that the supplementation of 50-200 mg kg -1 of GE in the diet could reduce diarrhea incidence, increase activities of superoxide dismutase, glutathione peroxidase and total anti-oxidant capacity in the serum (P < 0.05), decrease the levels of interleukin 1β, interleukin 6 and tumor necrosis factor α in the serum or jejunum mucosa (P < 0.05), and increase villus height and villus height to crypt depth ratio (P < 0.05) in the jejuna of piglets challenged by oral ETEC compared with negative control group (NC). Meanwhile, diet supplementation with 50-200 mg kg -1 GE reduced the levels of D-lactate, endothelin-1 and diamine oxidase in the serum, and increased the expression of zonula occludens-1, Claudin-1, Occludin and Na + /H + exchanger 3 (P < 0.05) in the jejuna mucosa of piglets challenged by ETEC compared with the NC., Conclusions: These results suggested that GE could attenuate diarrhea and improve intestinal barrier function of piglets challenged by ETEC. © 2020 Society of Chemical Industry., (© 2020 Society of Chemical Industry.)