The methylation of nitroaromatic hydrocarbons is carried out in a pressure tube. The 3 mg catalyst is usually placed in the pressure tube together with 0.2 mmol nitroaromatics 2.4 mmol cesium carbonate and 2 ml methanol. And put it into the preheated oil bath pot, magnetic stirring heating for the corresponding time. After the reaction time is over, the pressure tube is removed and cooled to room temperature, and the solid catalyst is separated by a 0.22 μm filter membrane. The mixture was analyzed by GC or GC-MS and quantitatively analyzed by the normalization method.