Iodomethane (7.81 mL, 125 mmol) was slowly added dropwise to a solution of N,N-dimethylformamide (50 mL) containing 5-bromo-1H-indole-7-carboxylic acid (10 g, 41.7 mmol) and sodium carbonate (17.66 g, 167 mmol). The reaction mixture was stirred continuously for 2 h at room temperature. Upon completion of the reaction, it was filtered through a silica gel pad (500 g) and eluted with ether (600 mL). The collected eluate was washed once with deionized water (100 mL) and subsequently concentrated under reduced pressure to afford methyl 5-bromoindole-7-carboxylate (9.65 g, 91% yield). The product was confirmed by LC/MS analysis: m/z 253.8 (M+), retention time 2.15 min.