The 1,3-dipolar cycloaddition of N-aminopyridinium iodide (I) to dimethyl acetylenedicarboxylate (II) afforded the pyrazolopyridine system (III). Ester groups hydrolysis and regioselective decarboxylation of (III) with hot 50% sulfuric acid gave the mono-carboxylic acid (IV), which was further esterified with ethanol and sulfuric acid. Finally, reductive amination of the ethyl ester (V) with (p-chlorophenyl)piperazine (VI) in the presence of LiAlH4 provided the target compound.