A protocol on chemoselective cobalt(II) porphyrin-catalyzed intramolecular cyclopropanation of N-alkyl indoles/pyrroles with alkylcarbenes has been developed. The reaction enables the rapid construction of a range of nitrogen-containing polycyclic compounds in moderate to high yields from readily accessible materials. These N-containing polycyclic compounds can be converted into a variety of N-heterocycles with potential synthetic and biological interest. Compared to their N-tosylhydrazone counterparts, the use of bulky N-2,4,6-triisopropylbenzenesulfonyl hydrazones as carbene precursors allows cyclopropanation to occur under milder reaction conditions.