An efficient two-step procedure "imine formation/azirine-carbenoid coupling" has been developed for the preparation of 1,2-dihydropyrimidines from azirine-2-carbaldehydes, primary amines, and diazo carbonyl compounds under Rh(II) catalysis. The formation of 1,2-dihydropyrimidines involves 100% regioselective addition of the rhodium carbenoid to endocyclic nitrogen atom of the 2H-azirine-2-carbaldimine. According to the DFT calculations the reaction proceeds via dissociation of the metal-bound complex of the azirinium ylide to metal-free azirinium ylide, ring-opening of the latter to give a 1,5-diazahexa-1,3,5-triene, followed by 1,6-cyclization. The 1,2-dihydropyrimidines with two different electron-withdrawing substituents at the C position can undergo in solution inversion of configuration of the stereogenic center at C via "the N-C bond cleavage/rotation around the N-C single bond/1,6-cyclization" sequence.