NOVELTY - A ranolazine is synthesized by taking 2,6-dimethyl aniline as a raw material, carrying out amidation and alkylation to obtain N-(2,6-dimethyl-phenyl)-2-(1-piperazinyl)-acetamide; and reacting with 2-(2-methyl-phenoxy methyl)ranolazine obtained by reaction of 2-methoxy-phenol and epichlorohydrin to obtain a ranolazine crude product, and recrystallizing to obtain a ranolazine refined product.    USE - Method for synthesizing ranolazine used as an anti-angina drug.    ADVANTAGE - The phase transfer catalyst and recrystallization solvent are optimized. The method is easy to operate. The production cost is reduced. The yield is improved.    DETAILED DESCRIPTION - Synthesis of ranolazine involves:    (A) adding o-methoxy phenol, epichlorohydrin, an acid binding agent, and a phase transfer catalyst to a reaction flask, heating while stirring, cooling, filtering, washing a filter cake by epichlorohydrin, and combining filtrate;    (B) recycling 50 mmHg epichlorohydrin at 60-120 degrees C, collecting 30 mmHg of fraction at 136-138 degrees C to obtain 2-(2-methyl-phenoxy methyl)oxirane;    (C) adding 2,6-dimethyl aniline, methylene chloride, acid binding agent, and water to the reaction bottle at 20-25 degrees C, dropping acetyl chloride under stirring, cooling and filtering, washing dichloromethane to obtain a crude product;    (D) separating the filtrate to obtain a dichloromethane layer, distilling and recycling dichloromethane to be supersaturated, and cooling to a portion of the crude product;    (E) recrystallizing by ethanol to obtain a refined product 2-chloro-N-(2,6-diphenylmethyl)acetamide;    (F) adding piperazine hydrochloride salt, 2-chloro-N-(2,6-diphenylmethyl)acetamide and anhydrous ethanol to the reaction flask, refluxing and stirring, cooling, filtering and washing by anhydrous ethanol to obtain piperazine dihydrochloride, recycling, concentrating the filtrate to near dryness, and adding the purified water under stirring to adjust the pH to greater than 10 through extraction, combining the organic phase, drying, concentrating the filtrate to be dry, and recrystallizing the solid to obtain N-(2,6-dimethyl-phenyl)-2-(1-piperazinyl)-acetamide;    (G) adding N-(2,6-dimethyl-phenyl)-2-(1-piperazin-yl)-acetamide, 2-(2-methyl-phenoxy methyl)ethylene oxide, and methanol to the reaction flask, refluxing and stirring, evaporating the solvent to obtain the ranolazine crude product;and    (H) adding the ranolazine crude product and petroleum ether-ethanol mixed solvent, heating, adding an active carbon after cooling, heating and refluxing, thermally filtering, cooling the filtrate, and crystallizing and filtering to obtain a ranolazine pure product.