The invention relates to an active material extracted from euphorbia lathyris and application thereof, and belongs to the technical field of biological pesticides. The active material extracted from euphorbia lathyris is characterized in that a method for obtaining the active material comprises the following steps of: a, cleaning collected branches or leaves of the euphorbia lathyris by tap water, putting the cleaned branches or leaves in an oven for roasting at the temperature of 50 DEG C for 10 hours, cutting 10g of dried branches or leaves into pieces, and putting the cut branches or leaves in a triangular flask, soaking the branches or leaves by 80 percent ethanol, wherein the time for the first soaking extraction is 4 hours, and the time for the second and the third soaking extractions is 12 hours and 24 hours respectively; b, mixing extraction solution obtained by the extractions at the third time, condensing the obtained solution until the solvent is vaporized to obtain coarse extracts of the branches or leaves, dissolving the coarse extracts in methanol to prepare the solution of which the concentration is 0.1g / ml, and putting the obtained solution in a refrigerator for later use. The active material can be used for preparing a biological reagent of killing B.xylophilus. The active material has the advantages of low cost, simple and convenient preparation method, high efficiency and low toxicity, which can be used for preparing the biological reagent of killing B.xylophilus.