The heterocyclic core of imidazo[1,2-a]pyrimidine was formed in satisfactory yields as a result of the interaction of the readily available 2-aminoimidazole with N-substituted maleimides or N-arylitaconimides. The mechanism of the studied processes was postulated basing on experimental data, HPLC–MS analysis of reaction mixtures, and quantum chemical calculations. Molecular docking results of the obtained imidazo[1,2-a]pyrimidines, when compared with voriconazole, a drug already in clinical use, suggest that they may possess antifungal activity against Candida albicans.