Tubocapsicum anomalum, a Chinese medicinal plant rich in anti-tumor withanolides, requires efficient extraction methods. In this paper, an HPLC method was first established for the detection of withanolides, and gradient elution was carried out using a methanol–water solvent system. It was found that the content of withanolides was the highest in the leaves of T. anomalum, followed by the stems and fruits, and almost none in the roots. During the actual picking process, the quantity of leaves collected was relatively small, while the number of stems was the highest. Therefore, the Box-Behnken response surface method was used to optimize the ultrasonic-assisted extraction process of withanolides from the stems of T. anomalum. The optimal extraction conditions were determined as follows: the liquid–solid ratio was 20:1, the extraction solvent was 70 % ethanol, the ultrasonic power was 250 W, the ultrasonic time was 40 min, and the ultrasonic temperature was 50 °C. Under these conditions, the average yields of tubocapsenolide A (Te-A) and tubocapsanolide A (Ta-A) can reach 2.87 ± 0.12 mg/g and 1.18 ± 0.05 mg/g, respectively. We further compared extraction rates of two withanolides from different parts of T. anomalum using ultrasonic and traditional extraction methods. Ultrasonic extraction significantly increased rates, with the highest yields from leaves, followed by stems and fruits. The results show that ultrasonic optimization can improve extraction rate, reduce time, lower costs, enhance quality, and increase yield. Therefore, the optimized ultrasonic-assisted extraction process was adopted to extract the aerial parts of T. anomalum and separate the components. After optimization, the extract underwent several chromatographic separations to isolate eight previously undescribed withanolides (1–8) and two artificial withanolides (9–10), in addition to fifteen known compounds (11–25). Their structures were established through extensive spectroscopic data analysis. The compounds were evaluated for their antiproliferative effects against multiple cancer cell lines, including human hepatocellular carcinoma cells (HepG2, Hep3B, and MHCC97-H), human lung cancer cells (A549), human fibro-sarcoma cancer cells (HT1080), human chronic myeloid leukemia cells (K562), and human breast cancer cells (MDA-MB-231 and MCF7). Compounds 1–3, 5, 7, 11, 13, 15–16, and 22 displayed significant activity with IC50 values of 5.14–19.87 μM. The above results indicate that ultrasonic-assisted extraction technology can be used to obtain new withanolides more efficiently from T. anomalum, thereby enhancing the utilization rate of T. anomalum resources.