We recently establish that aspafilioside B, a steroidal saponin extracted from Asparagus filicinus, is an active cytotoxic component. However, its antitumor activity is till unknown. In this study, the anticancer effect of aspafilioside B against HCC cells and the underlying mechanisms were investigated. Our results showed that aspafilioside B inhibited the growth and proliferation of HCC cell lines. Further study revealed that aspafilioside B could significantly induce G2 phase cell cycle arrest and apoptosis, accompanying the accumulation of reactive oxygen species (ROS), but blocking ROS generation with N-acetyl-l-cysteine (NAC) could not prevent G2/M arrest and apoptosis. Additionally, treatment with aspafilioside B induced phosphorylation of extracellular signal-regulated kinase (ERK) and p38 MAP kinase. Moreover, both ERK inhibitor PD98059 and p38 inhibitor SB203580 almost abolished the G2/M phase arrest and apoptosis induced by aspafilioside B, and reversed the expression of cell cycle- and apoptosis-related proteins. We also found that aspafilioside B treatment increased both Ras and Raf activation, and transfection of cells with H-Ras and N-Ras shRNA almost attenuated aspafilioside B-induced G2 phase arrest and apoptosis as well as the ERK and p38 activation. Finally, in vivo, aspafilioside B suppressed tumor growth in mouse xenograft models, and the mechanism was the same as in vitro study. Collectively, these findings indicated that aspafilioside B may up-regulate H-Ras and N-Ras, causing c-Raf phosphorylation, and lead to ERK and p38 activation, which consequently induced the G2 phase arrest and apoptosis. This study provides the evidence that aspafilioside B is a promising therapeutic agent against HCC.