1,3,5-triamino-2,4,6-trinitrobenzene (TATB) is an essential insensitive energetic material. The alkylation of 1,3,5-trihydroxy-2,4,6-trinitrobenzene (Trinitrophloroglucinol, TNPG), which yields 1,3,5-triethoxy-2,4,6-trinitrobenzene (TETNB), is a pivotal step for the synthesis of TATB. The conventional synthetic process has suffered from long reaction time (∼165 min), intricate procedures, and intensive evaporation of a large number of volatile by-products, which increases the risk of spill and eruption of the reaction system, and necessitates in situ continuous gas–liquid separation. A new process for continuous alkylation in microreactors was proposed in this study. Firstly, a parametric investigation in the batch reactor was performed to explore the effects of various process parameters on the yields, resulting in the optimal experimental conditions, i.e., no reflux condensation, triethyl orthoformate (TEOF) as alkylation reagent, molar ratio of 12, reaction temperature of 120 °C and reaction time of 40 min. Subsequent continuous synthesis in microreactors was conducted, which realized the convenient process operation and no need of gas–liquid separation, leading to substantial improvement in the reaction efficiency and safety. Remarkably, within a packed microreactor, under the reaction temperature of 130 °C and residence time of 3 min, 99.24 % in the yield of TETNB was achieved. Comparing with conventional batch reactors, the required reaction time was reduced to approximately 1/50. Taking the advantages of precise control of temperature and reaction time in the microreactors, the kinetics of alkylation reaction were determined. This innovative approach of continuous synthesis can provide an efficient and alternative route for the synthesis of TATB, as well as other energetic materials and similar processes.