Streptococcus agalactiae (S. agalactiae) infection is a significant cause of mastitis, resulting in loss of cellular homeostasis and tissue damage. Autophagy plays an essential function in cell survival, defense, and the preservation of cellular homeostasis, and is often part of the response to pathogenic challenge. However, the effect of autophagy induced by S. agalactiae in bovine mammary epithelial cells (bMECs) is mainly unknown. So in this study, an intracellular S. agalactiae infection model was established. Through evaluating the autophagy-related indicators, we observed that after S. agalactiae infection, a significant quantity of LC3-I was converted to LC3-II, p62 was degraded, and levels of Beclin1 and Bcl2 increased significantly in bMECs, indicating that S. agalactiae induced autophagy. The increase in levels of LAMP2 and LysoTracker Deep Red fluorescent spots indicated that lysosomes had participated in the degradation of autophagic contents. After autophagy was activated by rapamycin (Rapa), the amount of p-Akt and p-mTOR decreased significantly, whilst the amount of intracellular S. agalactiae increased significantly. Whereas the autophagy was inhibited by 3-methyladenine (3MA), the number of intracellular pathogens decreased. In conclusion, the results demonstrated that S. agalactiae could induce autophagy through PI3K/Akt/mTOR pathway and utilize autophagy to survive in bMECs.