The invention discloses a synthesizing method of a 1,2,3-triazole compound of On-DNA during construction of a DNA coded compound storehouse. The method is divided into two types, wherein in one type of the method, an On-DNA alkyne compound is used as a substrate, in the presence of a Cu catalyst and an azide type reagent, the On-DNA alkyne compound reacts with micromolecule boric acid or a boric acid ester reagent to obtain a 1,4-disubstituted-1,2,3-triazole compound of the On-DNA; and in the other type of the method, an On-DNA azide compound is used as a substrate, in the presence of a metalNi catalyst or a metal Ru catalyst and a phosphine reagent, the On-DNA azide compound reacts with a micromolecule alkyne reagent to obtain a 1,5-disubstituted-1,2,3-triazole compound of On-DNA. According to the preparation method of the 1,2,3-triazole compound of the On-DNA, provided by the invention, the raw materials are easy to obtain, the reaction condition is mild, the production rate is high, the universality of the substrate is high, the selectivity of products is good, and the synthesizing method is suitable for synthesizing of a DNA coded compound storehouse using a porous plate.