A method for preparing pyridotriazolone compound (II) by flow chemistry: dissolving hydrazide compound (I) in an organic solvent and placing it in a first storage tank, dissolving an oxidant in an organic solvent and placing it in a second storage tank In the storage tank; the materials in the first storage tank and the second storage tank are transported by metering pumps respectively, enter the mixer for mixing, and the mixed reaction liquid enters the tubular reactor continuously for oxidation rearrangement reaction, oxidation rearrangement The temperature is 0-70°C, the residence time of the mixed reaction solution in the tubular reactor is 0.1-10h, the reacted feed liquid enters the receiving tank, and after post-treatment, the product (II) is obtained; the tubular reaction of the present invention There is less material backmixing in the medium, high mass and heat transfer efficiency, and the occurrence of side reactions is significantly reduced; the reaction system is simple, the raw materials, especially hydrazide compounds, are easy to obtain, the substrate does not need to be prepared in multiple steps, and the total yield is high; continuous The tubular reaction can precisely control the parameters of the reaction, and has the prospect of automation;