The anhydrous ethanol co-vaporized with diethyl phthalate and sodium metal is added dropwise to the mixture of diethyl malonate, carbon tetrachloride and magnesium, heated to start the reaction, and the temperature is controlled to smooth the reaction. Then add anhydrous diethyl ether, heat for 1h, add the diethyl ether solution of phenylacetyl chloride (add slowly, not to make the reaction too intense). After the reaction is completed, cool and add water, separate the oil layer, and evaporate the diethyl ether under reduced pressure to obtain diethyl(phenylacetyl)malonate.