Aloperine (Alo), as a quinolizidine alkaloid extracted from S. alopecuroide, has the positive activities of anti-inflammatory, anti-allergenic, antitumor and anti-viral. However, the role and mechanism of Alo in breast cancer have not been studied yet. In the present study, Alo markedly inhibited the proliferation and suppressed the colony formation ability of the breast cancer cell lines MCF-7 and MDA-MB-231 in a dose-dependent manner by Cell Counting kit-8 and colony formation assays, respectively. In addition, the results of confocal microscopy analysis and flow cytometry detection revealed that Alo induced the apoptosis of MCF-7 and MDA-MB-231 cells, and western blotting indicated that Alo upregulated the protein levels of Bax, caspase-3 and caspase-9, and downregulated the expression of Bcl-2. Furthermore, the results of wound healing, Transwell migration and invasion assays demonstrated that Alo inhibited the migration and invasion of MCF-7 and MDA-MB-231 cells, and reduced the protein levels of matrix metalloproteinase (MMP)-2 and MMP-9. Alo also downregulated the protein expressions of Ras, phosphorylated (p)-Raf proto-oncogene, serine/threonine kinase 1 and p-extracellular signal-regulated kinase 1/2. Furthermore, ISIS 2503, a Ras inhibitor, inhibited colony formation, induced apoptosis, and suppressed the migration and invasion of MCF-7 and MDA-MB-231 cells. These effects were more marked in the presence of ISIS 2503 and Alo, when compared with those of either agent alone. In conclusion, the present study reported a novel use of Alo in inhibiting the proliferation, migration and invasion, and inducing the apoptosis of human breast cancer cells by blocking the Ras signaling pathway.