The invention discloses a preparation method of an ultraviolet-resistant polyester film, which is characterized by comprising the following steps: adding o-hydroxybenzoic acid and acetone into a reaction kettle, dropwisely adding acetyl chloride, and carrying out esterification reaction to obtain o-cresol diacetate; adding dichloroethane, N, N-dimethylformamide and anhydrous aluminum trichloride,dropwise adding a dichloroethane solution of solid phosgene, carrying out an acylation reaction, and distilling to recover the solvent; adding dilute hydrochloric acid and performing cooling, standing, solid precipitation, suction filtration, water washing and recrystallization after a hydrolysis reaction to obtain an ultraviolet light absorber; performing condensation polymerization reaction on terephthalic acid, ethylene glycol, an ultraviolet light absorber, antimonous oxide and trimethyl phosphate to obtain polyester chips; drying the polyester chips, extruding through an extruder, preparing a cast sheet through a cold drum, longitudinally stretching and transversely stretching the cast sheet, carrying out heat setting, and cooling to obtain the ultraviolet-resistant polyester film. The ultraviolet-resistant polyester film prepared by the method is suitable for solar backboard base films, building films, furniture films, packaging films and the like.