The reaction of methyl esters of 2-substituted 5-pyrimidinecarboxylic acids with hydrazine hydrate at 0–5°C results in the nucleophilic substitution of readily eliminating groups (Cl, CH3O, CH3S) at the position 2 of the pyrimidine ring, and, on the boiling with the 80% aqueous solution of hydrazine hydrate, the reaction is accompanied by the formation of hydrazides. The dimethylamino group at thepposition 2 of the pyrimidine ring is not substituted by hydrazine.