The invention belongs to the technical field of chemical engineering, and in particular relates to a method for synthesizing beta-ester group-gamma-butyrolactam and gamma-ester group-delta-valerolactam. The method comprises the following steps: by taking ZnEt2 as an alkylation reagent, performing selective alkylation on fumaric acid ester, itaconic acid ester and methylic glutarate at near room-temperature, and performing Mannich addition on imine, and performing a cyclization reaction. The method provided by the invention is common in reaction raw material and low in price, a transition metal catalyst is not needed, one-pot method synthesis is achieved in a same reaction container through serial reactions, separation process and product loss can be reduced, the method is simple and convenient to operate, efficient in process and mild in condition, and the reactions can be implemented at normal temperature or near room-temperature.