(1) N-(2-haloethyl)trifluoroacetamide was prepared by reacting with ethyl trifluoroacetate in the presence of a solvent and a catalyst using a 2-haloethylamine compound as an initial raw material;
(2) N-(2-haloethyl)trifluoroacetamide obtained in step (1) was prepared by reacting with methylamine or methylamine hydrochloride in the presence of a solvent and a catalyst to obtain N-methyl-N'-trifluoroacetylethylenediamine;
(3) taking N-methyl-N'-trifluoroacetylethylenediamine obtained in step (2) as raw material, reacting with 1,3-disubstituted propane compounds under the action of a solvent and a catalyst to prepare N-methyl-N '-trifluoroacetylhomopiperazine;
(4) using N-methyl-N'-trifluoroacetylhomopiperazine obtained in step (3) as raw material, reacting with hydrogen chloride ethanol solution to prepare to obtain N-methylhomopiperazine dihydrochloride and recovering ethyl trifluoroacetate;
(5) using N-methylhomopiperazine obtained in step (4) as raw material, reacting with 1,3-disubstituted propane compound under the effect of solvent and catalyst to prepare to obtain N-methylhomopiperazine dihydrochloride;
(5) using N-methylhomopiperazine dihydrochloride obtained in step (4) was used as raw material, and N-methylhomopiperazine was prepared by alkalization under the action of solvent and catalyst.