A method for preparing Ethyl 3-(pyridin-2-ylamino)propanoate comprises the following steps: using 2-aminopyridine and ethyl acrylate as raw materials, using anhydrous ethanol as a solvent, using trifluoromethanesulfonic acid as a catalyst, and heating in an oil bath to control the temperature at 120 to 160° C. for a catalytic reaction for 16 to 20 hours under nitrogen protection. The obtained reaction solution is washed with petroleum ether at a temperature of 35 to 40° C. and a pressure of 0.09 to 0.1 MPa, then concentrated under reduced pressure, and then washed with petroleum ether/ethyl acetate and recrystallized to obtain white flaky crystals of Ethyl 3-(pyridin-2-ylamino)propanoate.