Various halomethyleniminium salts as novel Vilsmeier agents were synthesized from formamide or N-methylformamide with POCl3. Treatment of N-1-substituted-aminopyrazoles including N-1-phenyl-5-aminopyrazoles, N-1-(2-pyridinyl)-5-aminopyrazoles, and N-1-(2-quinolinyl)-5-aminopyrazoles with these agents gave the corresponding pyrazolo[3,4-d]pyrimidine, N-(1H-pyrazol-5-yl)formamide, or N-(1H-pyrazol-5-yl)formamidine. The reaction was different from the traditional Vilsmeier-type reaction and the plausible reactive pathways were proposed for the unexpected result.