The transformation of 3-[(ethoxymethylene)amino]-1-methyl-1H-pyrazole-4-carbonitrile into the 14-membered macrocycle, 2,10-dimethyl-2,8,10,16-tetrahydrodipyrazolo[3,4-e:3',4'-l][1,2,4,8,9,11]hexaazacyclotetradecine-4,12-diamine, by the reaction with excess hydrazine under various conditions was studied in detail. The reaction proceeded through the initial formation of 4-imino-2-methyl-2,4-dihydro-5H-pyrazolo[3,4-d]pyrimidin-5-amine followed by dimerization to give the final macrocycle. A convenient synthesis of the latter starting from 4-imino-2-methyl-2,4-dihydro-5H-pyrazolo[3,4-d]pyrimidin-5-amine was developed. A plausible pathway for the macrocycle self-assembly is discussed. Some features of the structure and reactivity of the obtained macrocycle are outlined.