An easy preparation of enaminonitrile derivatives and their transformation into new substituted azolopyrimidines is described. The one-step transformation was carried out under microwave irradiation and by classical heating methods. The use of microwave irradiation led to high conversion and shorter reaction times.