Bovine mastitis harms milk quality and cattle health. Val-Pro-Pro (VPP) and Ile-Pro-Pro (IPP) are well-known milk-derived bioactive peptides with anti-inflammatory activity. However, the impact of VPP and IPP on mastitis remain unknown. This study aimed to investigate the anti-inflammatory effects and the underlying mechanisms of VPP and IPP in lipopolysaccharide (LPS)-induced inflammation. When cells were treated with LPS (1 µg/mL) for 24 h, the protein levels of pro-inflammatory factors (tumor necrosis factor-α (TNF-α), interleukin(IL)-1β and IL-6)) and chemokine (monocyte chemotactic protein-1 (MCP-1)) were markedly increased, and the protein level of anti-inflammatory cytokine (IL-10) was reduced. Both VPP and IPP with concentrations of 50 and 100 µM reversed these phenomena and further inhibited the protein expression of β-casein induced by LPS. In a mouse mastitis model, different concentrations of VPP and IPP (300, 600 µM/kg) pretreatment alleviated histopathological lesions in the mammary gland and suppressed the mRNA expression of TNFα, IL1β, and IL6 induced by LPS. VPP and IPP also maintained the integrity of the blood–milk barrier in mice. RNA-seq analyses indicated that enriched phosphatidylinositol 3-kinase/protein kinase B (PI3K/AKT) and mitogen-activated protein kinase (MAPK) signaling pathways likely contribute to the changes observed (P < 0.05 and |log2 fold change (FC)| ≥ 1). Notably, fibronectin was identified as an important hub by protein–protein interaction (PPI) analysis and molecular docking combined with molecular dynamics simulation. In summary, VPP and IPP exerted a protective effect on LPS-induced inflammation by regulating PI3K/AKT signaling pathway via fibronectin.