The invention discloses a method for preparing
pirfenidone, comprising the following steps: subjecting 2-amino-5-methylpyridine which is a starting material to inverse diazotization and
hydrolysis, extracting with extraction
solvent, and recrystallizing with recrystallization
solvent to obtain 2-hydroxy-5-methylpyridine; heating the 2-hydroxy-5-methylpyridine together with
iodobenzene in the presence of
anhydrous potassium carbonate and active
copper to subject the 2-hydroxy-5-methylpyridine and the
iodobenzene to
nucleophilic substitution reaction to generate a target compound which is the crude
pirfenidone; and recrystallizing the crude
pirfenidone for one time for purification with recrystallization solvents which are
ethyl acetate and
anhydrous ethyl
alcohol to obtain the pure pirfenidone. Compared with the prior art, the method for preparing the pirfenidone has the characteristics that: the 2-amino-5-methylpyridine which is the starting material is a commercial chemical product, is cheap and is easy to get, the inverse diazotization replaces the conventional diazotization reaction so that the operation is simple, and the
purification methods of the 2-hydroxy-5-methylpyridine and the end product which is the pirfenidone are easy to operate and have high yield. The method for producing the pirfenidone consumes less energy, and the production cost is lowered due to the adoption of the method.