The photolysis at 222 nm of 5-methyltetrazole isolated in a cryogenic argon matrix leads to formation of methyl nitrile imine as primary product. Subsequent irradiation at 328 nm induces transformation of the nitrile imine into 4π-electron three-membered-ring 3-methyl-1H-diazirine, which photorearranges to give methyl carbodiimide. These products were characterized by IR spectroscopy and theoretical calculations. For the first time, a 1H-diazirine was captured as intermediate in the photoisomerization of nitrile imines into carbodiimides.