The invention relates to a method for preparing a prepolymer containing C10, C15, and C20 olefins by using ethylene cracking C5 fractions as raw materials. , carry out Diels-Alder reaction at a pressure of 1.0-12.0 MPa for 3-12 hours, then cool down and discharge the material, and rectify to remove unreacted C5 components to obtain a prepolymer containing a mixture of C10, C15, and C20 olefins. The C5 petroleum resin produced by the prepolymer prepared by the method of the present invention has a narrow molecular weight distribution, can improve the compatibility of the resin with other hot-melt adhesive substrates SIS, SBS, EVA, greatly expands the scope of use of the petroleum resin, and can It is widely used in adhesives, coatings, inks, asphalt, rubber tires and other fields; at the same time, it can effectively improve the utilization rate of polymerizable olefins in C5 fractions.