The nucleophilic aromatic substitution of some activated aryl or heteroaryl halides has been performed in ionic liquid solution, using the 1-butyl-3-methylimidazolium azide as a nucleophile. The reaction course was studied varying the structures of both substrates and ionic liquids. In particular, in the latter case, the reaction of 2-bromo-5-nitrothiophene was carried out in five different ionic liquids ([bmim][BF 4], [bmim][PF 6], [bmim][NTf 2], [bm 2im][NTf 2], and [bmpyrr][NTf 2]). Finally, for all the substrates considered, a comparison with data obtained in MeOH solution in the presence of NaN 3 was also performed. Data collected indicate that in some cases it is possible to obtain aromatic or heteroaromatic azide derivatives in satisfactory yield by means of a S NAr reaction using [bmim][N 3] as the nucleophile.