The ant alkaloid myrmicarin 217 (1-ethyl-3,4,4a,5,6,7-hexahydro-2-propylpyrrolo[2,1,5-cd]indolizine, 1) was synthesized using a new method for the direct cyclization of appropriately disubstituted piperidines. The mechanism for the formation of the pyrrolo[2,1,5-cd]indolizine system was investigated by 1H-NMR spectroscopy, which showed the reaction to proceed through indolizidine intermediates. The course of this facile cyclization may parallel steps in the biosynthesis of mymicarin 217 and related alkaloids.