A method is described for the preparation of a 1-substituted 4-methyl-2-pyrazolin-5-one by catalytic hydrogenation under pressure and simultaneous methylation by means of paraformaldehyde of the appropriate 1-substituted 2-pyrazolin-5-one in a medium of an inert organic solvent comprising ammonium acetate.