The invention relates to a preparation method of a compound represented by a formula (I). The compound is prepared by reacting a compound represented by a formula (II) with a compound represented by a formula (III) in a
solvent under the
catalysis of a
palladium catalyst in
carbon monoxide atmosphere, wherein X is O or N; N is 0 or 1; when X is O, n is equal to 0; when X is N, n is equal to 1; R1 is selected from
aryl, heteroaryl,
alkyl, alkenyl or alkynyl; R2 is selected from
aryl, heteroaryl,
alkyl, alkenyl or alkynyl; R3 is selected from H, R2 forms a ring, or R2 and R2 are linked to form a ring; R4 is N3 or a
halogen atom; when R4 is the
halogen atom, a
system further contains
sodium azide. The preparation method has the beneficial effects that the reaction does not require strict
anhydrous and anaerobic conditions and high-pressure
carbon monoxide atmosphere, the operation is convenient and simple, and the reaction has very good tolerance and universality to functional groups; meanwhile, the use level of a catalyst is extremely low, the reaction cost is very low, and the method can be widely applied to the preparation of
sulfonylurea compounds.