A simpleconvenientmethod for synthesis of esters of annulated triazole-3-carboxylic acids and/or 1,2,4-triazine-5,6-dione derivatives was proposed. Heating cyclic imidates with methyl 2-hydrazinyl-2-oxoacetate afforded either the annulated triazoles or the annulated triazinediones depending on the reaction conditions. Under heating at hydrochloric acid 1,2,4-triazine-5,6-diones were transformed into