Formononetin (FOR), a natural flavonoid derived from Radix Astragali, has been reported to have anti-inflammatory and anti-oxidative effects. However, its protective mechanism against mastitis is still unknown. Nuclear factor kappa-B (NF-κB) signaling pathway plays an important role in inflammation, especially mastitis. Aryl hydrocarbon receptor (AhR) is involved in inflammatory regulation and defense against diseases. We investigated the protective effect of FOR on LPS-induced mastitis in mice and the effect of Ahr and NF-κB signaling pathways on the development of mastitis. In this study, mastitis model was induced by LPS injection through the nipple duct. Protective effect of FOR on LPS-induced mastitis was assessed by FOR pretreatment. The protective mechanism of FOR against mastitis was further investigated using LPS stimulation on mouse mammary epithelial cells EpH4-Ev. The results showed that LPS-induced mammary histological injury was inhibited by FOR. FOR significantly inhibited LPS-induced MPO activity. FOR administration enhanced the integrity of blood-milk barrier. In vitro and in vivo experiments showed that FOR inhibited LPS-induced NF-κB signaling pathway activation and the production of inflammatory factors TNF-α and IL-1ß. Moreover, FOR increased the expression of tight junction protein and enhanced blood-milk barrier integrity. LPS activated AhR and Src expression. But FOR induced significant increase in AhR inhibited Src phosphorylation to exert anti-inflammatory effects. In addition, AhR antagonist CH223191 reversed the inhibition of FOR on Src expression. And the inhibition of FOR on NF-κB activation and inflammatory cytokine production were reversed by AhR antagonist CH223191. In conclusion, FOR had protective effects against LPS-induced mastitis via suppressing inflammation and enhancing blood-milk barrier integrity via AhR-induced Src inactivation.