[reaction: see text] We have developed an efficient method for the preparation of medium- and large-sized nitrogen heterocycles via copper-catalyzed intramolecular N-arylation of phosphoramidates and carbamates. Introduction of the phosphoryl group or tert-butoxycarbonyl at N-termini can improve intramolecular cyclization under copper catalysis, and the phosphoryl and tert-butoxycarbonyl can easily be removed under the mild conditions; thus, the convenient and efficient method is suitable for the preparation of medium- and large-sized nitrogen heterocycles.