Diazo compounds represent a type of very important synthetic intermediates, which demonstrate wide applications in organic synthesis, continuous-in-flow technology, polymer synthesis, medicinal chemistry, chemical biology, material science and many other fields. On the other hand, diazo intermediates can be easily prepared from commercial available substrates through facile transformations, such as base-promoted decomposition of N-tosylhydrazones, diazo-transfer reaction, diazotization of alkyl amines, oxidation of hydrazones, decomposition of N-nitroso compounds. Traditional transformations of diazo compounds include nucleophilic addition/substitution by using diazo compounds as the nucleophiles, ylide type reactions, dimerization or olefination, Wolff rearrangement, transition-metal-carbene or carbenoid mediated X-H insertion reactions, catalytic cyclopropanations or cyclopropenations, and the recently developed transition-metal-catalyzed carbenoid cross-coupling reactions. In addition to these classic reactions, the diazo compounds also undergo nitrogen group retaining reactions, in which the diazo moiety is incorporated into the nitrogen-containing moiety in the target molecules. This strategy has provided an efficient and selective synthetic approach towards nitrogen atom containing functional molecules, especially for the synthesis of various N-heterocyclic compounds. Among them, the enantioselective C-N bond forming reaction as well as the asymmetric N-heterocyclic scaffold construction has important synthetic value and remains great challenge to the organic chemists. Thus, nitrogen component retaining reactions of diazo compounds has opened up a superior avenue in organic synthesis. Considering about the significant importance and the great growth in the past decade of this area, this review article will focus on the nitrogen group retaining reaction of diazo compounds. According to the reaction mechanism of these transformations, this review will be divided into the following parts: diazo compounds as nucleophiles, diazo compounds as 1,3-dipoles in cycloaddition reaction, diazo compounds as electrophiles, intramolecular reactions of vinyldiazo compounds, reduction reaction, and miscellaneous transformation. We hope that this review will corroborate the practical use of this research area as a convenient and valuable synthetic strategy. Keywords diazo compound; organic synthesis; N-heterocycle; cycloaddition