Step A: Preparation of methyl 1-methyl-1H-1,2,4-triazole-3-carboxylate: To a suspension of sodium hydride (60% oil dispersion, 0.346 g, 8.66 mmol) in N,N-dimethylformamide (DMF, 20 mL) under stirring at 0°C under nitrogen protection was slowly added dropwise methyl 1H-1,2,4-triazole-3-carboxylate (1.00 g, a 7.87 mmol) solution in DMF (20 mL). The reaction mixture was continued to be stirred at 0 °C for 1 hour. Subsequently, iodomethane (MeI, 0.982 mL, 15.7 mmol) was added dropwise. The reaction mixture was stirred at room temperature overnight. Upon completion of the reaction, the mixture was poured into cold water and extracted with ethyl acetate (EtOAc). The organic layers were combined, washed with saturated brine, dried over anhydrous sodium sulfate and concentrated under reduced pressure. The residue was purified by silica gel column chromatography (eluent: hexane/ethyl acetate=3:1) to afford the target product methyl 1-methyl-1H-1,2,4-triazole-3-carboxylate (0.380 g, 34% yield) as a white solid. Mass spectrum (APCI) m/z = 142.1 (M + H).