The invention belongs to the field of medicine and chemical engineering, and particularly discloses a preparation technology for 5-(2-cyano4-pyridyl)-3-(4-pyridyl)-1,2,4-troazole (topiroxostat). The preparation technology is characterized in that methyl isonicotinate serving as a compound II is used as a starting raw material, the compound II, phosphorus oxychloride, N,N-dimethyl formamide, iodine and 28% ammonium hydroxide form a compound III which is 2-cyano methyl isonicotinate in a one-pot synthesis mode, then a compound IV which is 2-cyano isonicotinyi hydrazine is formed through synthesis, a topiroxostat crude product Ia is prepared through condensing the compound IV which is 2-cyano isonicotinyi hydrazine and 4-cyanopyridine, salifying is performed on the crude product Ia and para-toluenesulfonic acid to form topiroxostat tosilate Ib, and finally the topiroxostat finished product I is obtained through desalting in a refined mode. The number of reactions steps is reduced, the yield of the finished product is increased, the reaction process is low in toxin and has small influences on environment, the reaction route is short, the cost is greatly lowered, the product purity is larger than 99.7%, the net contamination is smaller than 0.1%, and standard requirements are met.