Heterocyclization of functionalized vinylic derivatives of imidazo[1,2-a]pyridines was explored experimentally and theoretically using semiempirical AM1 and ab initio methods. A range of functionalized vinylic derivatives (azido, amino, and carbodiimide groups) were prepared for conversion into pyrroloazaindoles 19-22, imidazo[1,x]-, (x = 5, 6, 7, 8), [2,6]-, and [2,7]naphthyridines 28-30, 35-38 by thermal reaction. In the case of vinylic groups in the 5 position, peri annulation also was observed. The experimental and theoretical data are compared and discussed.