Tilmicosin is an antimicrobial agent used to treat intramammary infections against Staphylococcus aureus and has clinical anti-inflammatory effects. However, the mechanism by which it modulates the inflammatory process in the mammary gland is unknown. We evaluated the effect of tilmicosin treatment on the modulation of the mammary innate immune response after S. aureus infection and its effect on casein production in mammary epithelial cells. To achieve this goal, we used immortalized mammary epithelial cells (MAC-T), pretreated for 12 h or treated with tilmicosin after infection with S. aureus (ATCC 27543). Our data showed that tilmicosin decreases intracellular infection (P < 0.01) and had a protective effect on MAC-T reducing apoptosis after infection by 80% (P < 0.01). Furthermore, tilmicosin reduced reactive oxygen species (ROS) (P < 0.01), IL-1β (P < 0.01), IL-6 (P < 0.01), and TNF-α (P < 0.05) production. In an attempt to investigate the signaling pathways involved in the immunomodulatory effect of tilmicosin, mitogen-activated protein kinase (MAPK) phosphorylation was measured by fluorescent-activated cell sorting. Pretreatment with tilmicosin increased ERK1/2 (P < 0.05) but decreased P38 phosphorylation (P < 0.01). In addition, the anti-inflammatory effect of tilmicosin helped to preserve casein synthesis in mammary epithelial cells (P < 0.01). This result indicates that tilmicosin could be an effective modulator inflammation in the mammary gland. Through regulation of MAPK phosphorylation, ROS production and pro-inflammatory cytokine secretion tilmicosin can provide protection from cellular damage due to S. aureus infection and help to maintain normal physiological functions of the bovine mammary epithelial cell.