The present invention relates to the technical field of medicine. Provided are methods of preparing icotinib, icotinib hydrochloride, and intermediates thereof. The methods avoid the use of phosphoryl chloride, thereby greatly reducing the emission of pollutants, which is of major benefit to the economy and environment.