Medulla Tetrapanacis (MT) is a commonly used herbal ingredient in soup to promote lactation and management of mastitis among lactating mothers worldwide, particularly in Asian countries. However, scientific evidence to support its usage in the management of mastitis is limited. This study aimed to investigate the effects of MT water extract and its underlying mechanisms in Staphylococcus aureus (SA)–induced mastitis in human mammary epithelial cells (HuMEC) and lipopolysaccharide (LPS)–induced mastitis in lactating Sprague–Dawley (SD) rats. The anti‐inflammatory and antibacterial effects of MT water extract were examined in SA‐infected HuMEC by ELISA and plate counting, respectively. The effects of MT water extract on blood‐milk barrier and the underlying mechanism of action of the MT water extract were also investigated by transendothelial electrical resistance assay and western blot. The effects and mechanisms of MT water extract on alleviating mastitis on SD rats were evaluated using LPS‐induced mastitis rat model. Our results showed that MT water extract could suppress SA‐induced mastitis by reducing SA internalization and growth, protecting blood‐milk barrier integrity, and attenuating release of cytokines (interleukin 6 [IL‐6] and tumor necrosis factor‐alpha [TNF‐α]) in HuEMC. Furthermore, the antibacterial effect might be related to the increase of antimicrobial peptides transcription, and the anti‐inflammatory effect is at least partly mediated by inactivation of p38 and JNK signaling pathways. Finally, our in vivo results showed that MT water extract ameliorated LPS‐induced mastitis in SD rats via suppressing inflammatory cytokine release (TNF‐α, IL‐6, and interleukin‐1 beta), myeloperoxidase, and alleviating pathohistological damage by downregulation of JNK signaling pathway.