Cucurbitacins are secondary metabolites that are commonly found in the Cucurbitacae family. Many biological properties have been reported for cucurbitacins, including anti-inflammatory, antioxidant, antiviral, anti-malaria, and anticancer properties. While studies for the anticancer property of cucurbitacins focus mostly on the cell-cycle progression and apoptosis, no study has considered the effect of cucurbitacin on other cancer behaviors. Here, we report cell-proliferation-based drug testing on random herbal extracts leading to the identification of cucurbitacin B as an anticancer compound. Interestingly, cucurbitacin B had no effect on the proliferation of rat embryonic myoblast cells. We also found that cucurbitacin B significantly reduced the invasiveness of at least two highly metastatic breast cancer and melanoma cells. Using known cancer stem-cell markers, we observed a significant reduction of the melanoma stem cells. Molecularly, cucurbitacin B caused reduction of the metastasis-promoting gene Snail in melanoma and one of the cancer stem cell markers, ALDH1A1 (aldehyde dehydrogenase 1 A1), in breast cancer. Finally, we report the potential toxicity of cucurbitacin B in developing skin tissue and the olfactory organ using zebrafish embryo. In summary, our study suggests the potential use of cucurbitacin B for cancer metastasis and relapse treatment.