Methyl 1H-indazole-5-carboxylate (22 g, 0.13 mol) and iodomethane (62 g, 0.44 mol) were added to potassium carbonate (60 g, 0.44 mol) in N,N-dimethylformamide (200 mL). Subsequently, iodomethane was added dropwise at room temperature and the reaction mixture was stirred for 5 hours. Upon completion of the reaction, the reaction was quenched by the addition of water (200 mL) and extracted with ethyl acetate (4 x 200 mL). The organic layers were combined, dried with anhydrous sodium sulfate and concentrated under reduced pressure to give the crude product. Purification by silica gel column chromatography using a petroleum ether solution containing 2% ethyl acetate as eluent gave methyl 1-methyl-1H-indazole-5-carboxylate as an orange solid (13 g, 55% yield). The product was analyzed by LC-MS (ES, m/z): [M + H]+ 191.0. 1H NMR (300 MHz, DMSO-d6) δ: 8.48 (s, 1H), 8.24 (s, 1H), 7.97-7.94 (dd, J = 1.50, 8.70 Hz, 1H), 7.77-7.72 (m, 1H), 4.09 (s. 3H), 3.88 (s, 3H).