Alkylation of 4-methoxy-1 H-pyrazolo[3,4- d]pyrimidine (1b) with iodomethane in THF using NaHMDS as base selectively provided N2-methyl product 4-methoxy-2-methyl-2 H-pyrazolo[3,4- d]pyrimidine (3b) in an 8/1 ratio over N1-methyl product (2b). Interestingly, conducting the reaction in DMSO reversed selectivity to provide a 4/1 ratio of N1/N2 methylated products. Crystal structures of product 3b with N1 and N7 coordinated to sodium indicated a potential role for the latter reinforcing the N2-selectivity. Limits of selectivity were tested with 26 heterocycles which revealed that N7 was a controlling element directing alkylations to favor N2 for pyrazolo- and N3 for imidazo- and triazolo-fused ring heterocycles when conducted in THF. Use of 1H-detected pulsed field gradient-stimulated echo (PFG-STE) NMR defined the molecular weights of ionic reactive complexes. This data and DFT charge distribution calculations suggest close ion pairs (CIPs) or tight ion pairs (TIPs) control alkylation selectivity in THF and solvent-separated ion pairs (SIPs) are the reactive species in DMSO.