Chronic low‑grade inflammation defines obesity as a metabolic disorder. Alterations in the structure of gut flora are strongly associated with obesity. Lactoferrin (LF) has a biological function in regulating intestinal flora. The present study aimed to investigate the therapeutic and anti‑-inflammatory effects of LF in obese mice based on intestinal flora. A total of 30 C57BL/6 mice were divided into three groups consisting of 10 mice each. Subsequently, one group was fed a normal diet (Group K), another group was fed a high‑fat diet (Group M) and the remaining group switched from regular drinking to drinking 2% LF water (Group Z2) after 2 weeks of high‑fat diet; all mice were fed for 12 weeks. After the experiment, the mouse blood lipid and lipopolysaccharide levels, levels of inflammatory factors and intestinal tight junction proteins were assessed. Mouse stool samples were analyzed using 16S ribosomal RNA sequencing. The results showed that LF reduced serum total cholesterol, triglycerides and low‑density lipoprotein levels, elevated high‑density lipoprotein levels, suppressed metabolic endotoxemia and attenuated chronic low‑grade inflammatory responses in obese mice. In addition, LF upregulated zonula occludens‑1 and occludin protein expression levels in the intestine, thereby improving intestinal barrier integrity. LF altered the intestinal microbial structure of obese mice, reduced the ratio of Firmicutes and an elevated ratio of Bacteroidota, modifying the bacterial population to the increased relative abundance of Alistipes, Acidobacteriota, Psychrobacter and Bryobacter.