The invention discloses a method for extracting schaftoside from herba desmodii styracifolii. The method comprises the following steps: (1) cleaning and air drying the herba desmodii styracifolii, pulverizing the herba desmodii styracifolii by using a pulverizing machine, and sieving; (2) subcritical water extracting: placing the processed raw material in an extraction kettle, adding hydroxyethylcellulose equivalent to 0.001 parts by weight of the raw material, injecting deoxygenated deionized water into the kettle, wherein the extraction temperature is 150 to 160 DEG C, the pressure is 8 to10Mpa, the extraction time is 0.5 to 1.0h, extracting the herba desmodii styracifolii, after the extraction is ended, releasing the pressure, enabling extract liquid to flow into a collection tank, cooling to room temperature, and obtaining the extract liquid; and (3) purifying: concentrating the extract liquid obtained in step (2), performing the column chromatography by virtue of macroporous resin, eluting by using 50 percent by volume of ethanol, obtaining eluent, concentrating, and drying, thus obtaining a finished product.