Photoinduced cascade of two 6π-electron six- and five-center electrocyclizations in aromatic azido imines is oxidatively controlled to yield complex fused benzimidazoles or indazoles. Formation of benzimidazoles occurs via an unprecedented carbon-to-nitrogen o-iminoaryl 1,2-shift.