The alkylation of imidazole (C3H4N2) with propargyl bromide (C3H3Br) using some magnesium oxides as catalysts under microwave irradiation was carried out with a high activity and selectivity. It has been found that it is possible to prepare efficiently N-alkyl derivatives of heterocycles under microwave irradiation in absence of solvent. Under these experimental conditions N-alkylated heterocycles can be obtained with higher selectivities than when using other basic media.