A general method for the synthesis of oxazolines and oxazoles was developed through I2-catalyzed C-O bond formation and dehydrogenation with the same oxidant, TBHP. By simply tuning reaction bases, either oxazolines or oxazoles were selectively produced from β-acylamino ketones.