Mastitis in dairy cows is defined by inflammation of mammary tissue, and represents a significant challenge in the dairy industry. The microRNA miR-214 is recognized as a key endogenous regulatory molecule with a critical role in inflammatory diseases. However, its involvement in the regulation of mastitis remains unclear. This study, investigated the role of miR-214 in dairy mastitis and explored its therapeutic potential. It was observed that miR-214 expression was reduced in an in vivo lipopolysaccharide (LPS)-induced mouse mastitis model and an in vitro LPS-induced bovine mammary epithelial cell (bMEC) inflammation model. The miR-214 mimic was found to suppress the expression of inflammatory cytokines IL-1β, TNF-α, and IL-6. Furthermore, the miR-214 mimic inhibited nuclear factor-κB (NF-κB) pathway activation in LPS-induced bMECs. Dual-luciferase reporter assay results confirmed that miR-214 targeted tumor necrosis factor receptor-associated factor 1 (TRAF1) to inhibit its expression. Silencing TRAF1 in bMECs reduced LPS-induced expression of inflammatory cytokines and NF-κB pathway activation. Conversely, TRAF1 overexpression negated the inhibitory effects of miR-214 on LPS-induced inflammatory cytokines expression and NF-κB pathway activation in bMECs. Additionally, in the in vivo LPS-induced mouse mastitis model, miR-214 alleviated pathological damage and decreased inflammatory cytokines expression in mammary tissue. These findings suggest that miR-214 inhibits NF-κB activation by downregulating TRAF1 expression thereby mitigating LPS-induced inflammatory responses. This study highlights a potential novel approach for the treatment of mastitis in dairy cows.