The invention discloses a method for preparing 4-aminobutyrate derivatives, and relates to a method for preparing the 4-aminobutyrate derivatives. The purpose of the invention is to solve the problemsof complicated steps, a low yield, and environmental pollution in the synthesis of the 4-aminobutyrate derivatives by using conventional methods. The method comprises the following steps: a diarylamine derivative, an olefin derivative and ethyl diazoacetate are dissolved into an organic solvent under a nitrogen atmosphere and room temperature, then a photocatalyst is added, mixing is performed uniformly, the mixed material is placed below a blue LED lamp, an illumination reaction is performed, rotary evaporation is performed to remove the solvent, chromatography separation purification is performed by using a silica gel column, and therefore the product, one 4-aminobutyrate derivative, is obtained. The reaction in the method provided by the invention can be performed under a normal temperature and normal pressure, the reaction conditions are mild, the yield can reach 80%, and the method has the advantages of simple operation, no pollution, safety, environmental friendliness and low costs, and is applied to the field of organic synthesis.