The invention discloses a method for preparing an ester compound by colophony and glycidyl methacrylate. The method comprises the following steps of: dissolving 10 parts by weight of colophony in 10-300 parts by weight of toluene solvent, adding 20-100 parts by weight of glycidyl methacrylate, evenly mixing in a stirring way, adding 0.2-3 parts by weight of catalyst triethylamine and 0.1-1 part by weight of polymerization inhibitor hydroquinone, heating to lead the reaction temperature to keep at 60-100 DEG C, reacting for 5-10h, and after ending the reaction, and distilling by means of pressure reduction under the temperature of 70DEG C and the vacuum degree of 0.1MP to recover solvent toluene, so that the obtained product is the ester compound prepared by colophony and the lycidyl methacrylate. The preparation method has the advantages that the raw material is easy to take, the one-step method is simple in reaction operation, reaction temperature is low, the energy consumption can be saved, the solvent is easy to recover and the like; and the obtained product contains an acryloxy functional group, is high in polymerization activity, and can be co-polymerized with other monomers, so that a ternary phenanthrene ring-containing polymer can be prepared.