Triple-negative breast cancer (TNBC) is a type of breast cancer characterized by high molecular heterogeneity. Owing to the lack of effective therapeutic strategies, patients with TNBC have a poor prognosis. Prunella vulgaris L has the effects of reducing swelling, dissolving knots and treating breast carbuncles and mammary rocks. Modern pharmacological studies have reported that it can effectively inhibit the growth of breast cancer. The main active antitumor components of Prunella vulgaris are triterpenoids (PVT); however, the role and potential mechanism of PVT in TNBC remain unexplored. Our study aimed to further explore the inhibitory effects of PVT on TNBC and the associated mechanism. The results showed that 19 compounds associated with PVT were identified, 9 of which were triterpenoids. The percentages of ursolic acid and oleanolic acid in PVT were 34.51% and 11.32%, respectively. Triterpenes of Prunella vulgaris significantly inhibited the proliferation, migration and invasion of MDA-MB-231 cells and promoted their apoptosis in a concentration-dependent manner. PVT could also effectively downregulate the mRNA and protein expression levels of Ptp1b, Pi3k, Akt and mtor and upregulate the mRNA and protein expression levels of Il-24 in MDA-MB-231 cells. In mice with tumors of TNBC, PVT significantly reduced tumor growth and the expression levels of PTP1B, CXCL12, CXCR4, PI3K, AKT, mTOR and other proteins in TNBC tumor tissue and upregulated the expression of IL-24. This study showed that PVT played an anti-TNBC role by regulating the PTP1B/PI3K/AKT/mTOR signaling pathway and the IL-24/CXCL12/CXCR4 signaling axis.