Density functional (B3LYP/6-311+G) and ab initio (MP2/6-311+G and MP4(SDTQ)/6-311+G//MP2/6-311+G) calculations on the ring closure reactions of (E)- and Z-iminodiazomethane ((E)-5, (Z)--5), vinyldiazomethane 7, and formyldiazomethane 9 to 1H-1,2,3-triazole 6, 3H-pyrazole 8, and 1,2,3-oxadiazole 10, respectively, are reported. (E)-5 cyclizes via a low barrier (ca. 10 kcal mol(-)(1)) pseudopericyclic nonrotatory transition state. Ring closure of (Z)-5 and 7 proceeds by a monorotatory movement of the imino or vinyl group with a substantially higher barrier (ca. 25 kcal mol(-)(1)). Despite being endothermic, for the reaction 9 --> 10 also a rather low activation energy (ca. 10 kcal mol(-)(1)) is computed. The NBO analysis is used to interpret the electronic structures of the respective transition states in terms of their pericyclic monorotatory (TS ((Z)-5 --> 6), (TS (7 --> 8)) or pseudopericyclic nonrotatory ((TS ((E)-5 --> 6), (TS (9 --> 10)) nature.