The possibility of the three-component condensation of hydrazoicacid and formaldehyde with primary or secondary amines, as well as with trialkylhydrazines, leading to the corresponding N-azidomethyl derivatives of amines and hydrazides was established.