The reaction of pyrrole- and indole-carbaldehydes having a propargyl group attached to the nitrogen atom with various amines was studied. The reaction with ammonia formed pyrrolo[1,2-a]pyrazine and pyrazino[1,2-a]indole while the reaction with alkylamines such as methyl, ethyl, hexyl, and benzylamines formed the corresponding pyrazinone derivatives. Unexpectedly, the reaction with allylamine and propargylamine formed pyrazine derivatives in which the allyl and propargyl groups were removed from the molecule. On the other hand, the reaction of N-propargylated pyrrole-carbaldehyde formed indolizine derivatives upon reaction with sterically bulky adamantyl- and tert-butylamines. To understand the main factors causing these differences in reactivity, the reaction mechanisms were studied by means of computational methods. Our calculations showed that bulky amines tend to attack the central carbon of allene formed by the isomerization of N-propargyl functionality, while the attack on the carbonyl carbon by aliphatic amines is more profound.