The invention discloses a method for synthesizing piperidine and homolog thereof from N-pyridine oxide and homolog thereof. The method comprises the following steps: firstly weighing 95-110g of N-pyridine oxide and homolog thereof, 63g of formic acid and 500mL of a solvent, putting the N-pyridine oxide and homolog thereof and ammonium formate into a reaction kettle, adding the solvent, controllingthe temperature to 25-35 DEG C, uniformly stirring to carry out a reaction, washing with water after stirring is completed, and finally carrying out vacuum distillation to remove the solvent, therebyobtaining a product. By adopting the method disclosed by the invention, the problems that piperidine and homolog thereof are serious in environment pollution, low in yield, high in temperature and pressure, high in energy consumption and the like in a synthesis process since acid radical anion is generated can be solved, the method has the advantages of good environment protection, energy conservation, security and high yields, the yield of the product is up to 95% or greater, which is far greater than that of a conventional cycloaddition method, in addition, when reactions are carried out under normal temperature and normal pressure conditions, energy consumption in the reaction process can be reduced, the purposes of energy conservation and environment protection are achieved, and wideapplication prospects can be met.