The invention discloses a solanum lyratum extract, and an anticancer medicine comprising the solanum lyratum extract. The solanum lyratum extract is prepared through steps that: a solanum lyratum medicinal material is extracted by using ethanol, wherein the solanum lyratum medicinal material is processed through ethanol refluxing extraction, the recovered solvent is evaporated until dried, such that an ethanol extract is obtained; the extract is refined, wherein the ethanol extract is dissolved in water to form a solution, the solution is absorbed by using a weak acidic cation exchange macroporous resin column and is orderly eluted by using ethanol and hydrochloric ethanol, the hydrochloric ethanol eluent is collected and is neutralized by using ammonia water, and the collected product isdesalted, such that the solanum lyratum extract is prepared. The solanum lyratum extract contains 1% to 60% of steroid alkaloid. According to the invention, weak acidic cation exchange macroporous resin is adopted, steroid alkaloid is specifically accumulated from various components of solanum lyratum. The component of accumulated steroid alkaloid is simple. As a result of experiments, the substance has a substantial anticancer potency, and the anticancer potency is greatly higher than that of solanum lyratum aqueous crude extracts and steroid saponins extracted by using n-butyl alcohol in prior arts.