Herein we report a condition-controlled divergent synthesis of spiro indene-2,1’-isoindolinones and spiro isochroman-3,1’-isoindolinones through cobalt-catalyzed formal [4 + 1] and [4 + 1 + 1] spirocyclization of aromatic amides with 2-diazo-1H-indene-1,3(2H)-dione. When the reaction is carried out under air in ethyl acetate, spiro indene-2,1’-isoindolinones are formed through Co(II)-catalyzed C−H/N−H [4 + 1] spirocyclization. When the reaction is run under O2 in CH3CN, on the other hand, spiro isochroman-3,1’-isoindolinones are generated through Baeyer-Villiger oxidation of the in situ formed spiro indene-2,1’-isoindolinones with O2 as a cheaper and environmental-friendly oxygen source. In general, these protocols have advantages such as using non-precious and earth-abundant metal catalyst, no extra additive, high efficiency and regioselectivity. A gram-scale synthesis and the removal of the directing group further highlight its utility.