New carbamoyl-substituted azaindolizines were easily obtained by the reactions of diazines with bromoacetanilides, followed by the reactions of the corresponding N-phenylcarbamoylmethyl diazinium quaternary salts with ethyl propiolate in the presence of an epoxide as dehydrohalogenation agent and reaction solvent. Molecular orbital calculations, using AM1approximation, have been used to explain the regioselectivity in the 1,3-dipolar cycloaddition reactions of diazinium N-carbamoylmethylides to ethyl propiolate.