A straightforward synthesis of indolizines and pyrrolo[1,2-a]pyrazines was performed through a cascade condensation/cyclization/aromatization reaction of substituted 2-formyl-N-propargylpyrroles with active methylene compounds such as nitromethane, alkyl malonates, methyl cyanoacetate and malononitrile. Under basic conditions, the reaction proceeded satisfactorily to provide the corresponding 6,7-disubstituted indolizines. The condensation of the pyrrolic analogues with ammonium acetate gave rise to pyrrolo[1,2-a]pyrazines in high yields. N-Allenyl-2-formylpyrroles behaved as more reactive substrates than 2-formyl-N-propargylpyrroles, furnishing the expected indolizines in higher yields. Hence, an allenyl-containing intermediate was probably generated as the reactive species in the reaction mechanism of some N-propargyl pyrroles prior to the cyclization reaction.