The invention provides a preparation method of an ultraviolet absorbent UV-9. The preparation method comprises following steps: step 1, water and methanol are added to a reaction kettle firstly, stirring is started, resorcinol is added, heating is performed, then benzotrichloride is dropwise added to the reaction kettle until the reaction is completed, mother liquor is subjected to centrifugal spin-drying, washing is performed until pH is neutral, and a UV-0 crude product is obtained; step 2, the UV-0 crude product, toluene and an acid-binding agent sodium carbonate are added to another reaction kettle, heating reflux is performed until no water drops appear, after cooling is performed, a catalyst PEG-400 is added, dimethyl sulfate is dropwise added, a mixture is heated after addition andsubjected to thermal insulation reaction until the components are reacted completely, water is added for washing, a product is left to stand for layering, organic phase is distilled under reduced pressure to remove an organic solvent methylbenzene, and a UV-9 crude product is obtained; step 3, the organic solvent is added to the UV-9 crude product for recrystallization, and a UV-9 finished productis obtained after centrifugation and drying. The problem of non-uniform color of the UV-9 product is solved, the product yield is increased, and the product cost is reduced.