The aim of this study is to explore the mechanism of IL-17A infection in the development of bacterial mastitis in dairy cows. In this study, RT-qPCR and ELISA were used to measure the promoting effect of IL-17A on the generation of pro-inflammatory cytokines (TNF-α, IL-1β, and IL-6) and chemokine (IL-8). In addition, Western blot (WB) was applied to measure the influences of IL-17A on the inflammation-related ERK and p38 proteins in the MAPK pathways. The results show that under the stimulation of LPS on cow mammary epithelial cells (CMECs), cytokines IL-1β, IL-6, IL-8, TNF-α, and IL-17A will exhibit significantly increased expression levels (p < 0.05). With inhibited endogenous expression of IL-17A, cytokines IL-1β, IL-6, IL-8, and TNF-α will present reduced genetic expression (p < 0.01), with reduced phosphorylation levels of ERK and p38 proteins in the MAPK signaling pathways (p < 0.001). Upon the exogenous addition of the IL-17A cytokine, the genetic expression of cytokines IL-1β, IL-6, IL-8, and TNF-α will increase (p < 0.05), with increased phosphorylation levels of the ERK and p38 proteins in the MAPK signaling pathways (p < 0.001). These results indicate that under the stimulation of CMECs with LPS, IL-17A can be expressed together with relevant inflammatory cytokines. Meanwhile, the inflammatory responses of mammary epithelial cells are directly proportional to the expression levels of IL-17A inhibited alone or exogenously added. In summary, this study shows that IL-17A could be used as an important indicator for assessing the bacterial infections of mammary glands, indicating that IL-17A could be regarded as one potential therapeutic target for mastitis.