Various polysubstituted pyrimidines are smoothly formed via a base-promoted intermolecular oxidation C-N bond formation of allylic C(sp(3))-H and vinylic C(sp(2))-H of allyllic compounds with amidines using O2 as the sole oxidant. This protocol features protecting group free nitrogen sources, good functional group tolerance, high atom economy, and environmental advantages.