The preparation of substituted aminooxazoles and aminoimidazoles from α-arylamides and α-aminoamides through triflic anhydride-mediated amide activation is reported. These reactions proceed via the intermediacy of nitrilium adducts and feature N-oxide-promoted umpolung of the α-position of amides as well as a mechanistically intriguing sequence that results in sulfonyl migration from nitrogen to carbon. Quantum-chemical mechanistic analysis sheds light on the intricacies of the process.