In the present work, the combined electronic structure calculations and dynamics simulations have been performed to explore photocleavages of 2-formyl-2H-azirine and isoxazole in the gas phase and the subsequent rearrangement reactions. The carbonyl n → π(*) transition induces a cleavage of the C-N single bond of 2-formyl-2H-azirine to yield β-formylvinylnitrene in open-shell singlet state. However, the n → π(*) excitation of the imine chromophore results in a cleavage of the C-C single bond, producing a nitrile ylide intermediate through an internal conversion to the ground state. β-formylvinylnitrene and nitrile ylide with the carbonyl group are easily transformed into 2-formyl-2H-azirine and oxazole, respectively. The N-O bond cleavages on both S1((1)ππ(*)) and S2((1)nNπ(*)) of isoxazole are ultrafast processes, and they give products of 2-formyl-2H-azirine, 3-formylketenimine, HCN + CHCHO, and HCO + CHCHN. Both 2H-azirines and ketenimines were suggested to be formed from the triplet vinylnitrenes by intersystem crossing in the previous studies. However, our calculations show that the singlet β-formylvinylnitrene is responsible for the formation of 2-formyl-2H-azirine and 3-formylketenimine, and the singlet vinylnitrenes can play a key role in the photoinduced reactions of both 2H-azirines and isoxazoles.