It was shown that the reaction of 2-cyanothioacetamides with hydrazine involves both cyano- and thioamide groups, and 3,5-diaminopyrazoles are formed. In the reaction of 2-cyano-3-(dimethylamino)-N,N-dimethylprop-2-enethioamides with hydrazine and its derivatives, the interaction proceeds with the participation of cyano- and enamine groups, not affecting the thiocarbamoyl group, and leads to the formation of 4-thiocarbamoylpyrazoles. A synthesis method has been developed and a series of 1-substituted-4-thiocarbamoyl pyrazoles has been thus synthesized. The structure of the reaction products was studied using NMR spectroscopy and mass spectrometry and confirmed by X-ray diffraction analysis.