NOVELTY - 3,4-Bis(methoxyethoxy)-2-nitrobenzonitrile is reduced at 10-90 degrees C in a reaction solvent to obtain 2-amino-4,5-di-(2-methoxyethoxy)benzonitrile. 3-Aminophenylacetylene and N,N-dimethylformamide dimethyl acetal are reacted in a reaction solvent at 30-150 degrees C to obtain N'-(3-ethynyl-phenyl)-N,N-dimethyl-formamidine. 2-Amino-4,5-di-(2-methoxyethoxy)benzonitrile and N'-(3-ethynyl-phenyl)-N,N-dimethyl-formamidine are cyclized in a reaction solvent in the presence of a catalyst, to obtain erlotinib.    USE - Synthesis of erlotinib (claimed).    ADVANTAGE - The method does not require 4-ethyl imidazoline intermediate, does not use hydrogen or dangerous and polluting halogenated reagent, such as ferrous chloride and phosphorus oxychloride, provides high yield and conversion rate, and reliable product quality, enables convenient product separation and solvent recycle, is safe, simple, environmentally-friendly, and carried out at normal pressure, and does not require post-processing or refining using organic solvent.    DETAILED DESCRIPTION - 3,4-Dihydroxybenzaldehyde and chloroethylmethyl ether are reacted in a reaction solvent and a base, and the hydroxyl group is converted to ether group to obtain 3,4-bis(methoxy-ethoxy)benzaldehyde. The reaction solvent is dimethyl sulfoxide, dimethyl formamide, toluene, and/or xylene. The molar ratio of 3,4-dihydroxybenzaldehyde and chloroethylmethyl ether is 1:0.5-3. The obtained compound and hydroxylamine hydrochloride are reacted in a reaction solvent to obtain 3,4-bis(methoxyethoxy)benzonitrile. The reaction solvent is methanol, ethanol, propanol, isopropanol, n-butanol, toluene, benzene and/or xylene. The molar ratio of compound and hydroxylamine hydrochloride is 1:1-3. The obtained compound is nitrated using 50-85% nitric acid for 1-24 hours at 0-80 degrees C, to obtain 3,4-bis(methoxyethoxy)-2-nitrobenzonitrile. The molar ratio of compound and nitric acid is 1:3-12. The obtained compound is reduced at 10-90 degrees C in a reaction solvent to obtain 2-amino-4,5-di-(2-methoxyethoxy)benzonitrile. The reaction solvent is water, ethanol, methanol, isopropanol, dimethylformamide, and/or dimethyl sulfoxide. The reducing agent is reduced iron powder, hydrazine hydrate, sodium borohydride, and/or hydrosulfite. 3-Aminophenylacetylene and N,N-dimethylformamide dimethyl acetal are reacted in a reaction solvent at 30-150 degrees C to obtain N'-(3-ethynyl-phenyl)-N,N-dimethyl-formamidine. The reaction solvent is benzene, toluene, xylene, methanol, ethanol, propanol, isopropanol, n-butanol, dimethyl sulfoxide, and/or dimethylformamide. The molar ratio of 3-aminophenylacetylene and N,N-dimethylformamide dimethyl acetal 1:0.8-3. 2-Amino-4,5-di-(2-methoxyethoxy)benzonitrile and N'-(3-ethynyl-phenyl)-N,N-dimethyl-formamidine are cyclized in a reaction solvent in the presence of a catalyst, to obtain erlotinib. The reaction solvent is benzene, toluene, xylene, dimethyl sulfoxide, and/or dimethylformamide. The catalyst is acetic acid, hydrochloric acid, tetrabutylammonium iodide, tetrabutylammonium bromide, and/or tetrabutylammonium chloride. The reaction temperature is 30-150 degrees C The molar ratio of 2-amino-4,5-di-(2-methoxyethoxy)benzonitrile and N'-(3-ethynyl-phenyl)-N,N-dimethyl-formamidine is 1:0.8-3.