To provide a method for producing a nitrogen-containing heterocyclic compound, by which the nitrogen-containing heterocyclic compound having a nitrogen atom and other different kind atoms and having various uses can easily be produced from easily available raw materials at a low cost.
This method for producing the nitrogen-containing heterocyclic compound represented by formula (III) [R1 to R9 are each an identical or different group not participating in the reaction] comprises subjecting an amine compound represented by formula (I) [R1 to R9 and (n) are same as above] and a heterogeneous element compound represented by the formula (II): R10n-2EX2 [R10 is a group identical to X or a group not participating in the reaction; X is a releasing group; (n) is the atomic valency of an atom E; E is an atom selected from Bi, Sb, P, Si, S, Se and Te] to a cycling reaction using Mg.