Dimethylaminoacrylonitrile was continuously prepared from dimethylamine and acrylonitrile in a fixed-bed with a molar ratio of dimethylamine to acrylonitrile of 10:1-1:1, a reaction temperature of 10-120C, and an airspeed of 0.1-10 h-1, and the conversion of acrylonitrile and the selectivity of dimethylaminoacrylonitrile were both greater than 99%. The dimethylaminoacrylonitrile intermediate obtained directly enters the second fixed-bed reactor for hydrogenation without any purification treatment, and the hydrogenation pressure is 3-10MPa, with Raney-Ni catalyst, equipped with an alcohol solution co-catalyst of 0.1%-10% alkali, and the yield of N,N-dimethyl-1,3-propanediamine is not less than 98%, which is simple in preparation, stable in quality, energy-saving, environmentally friendly, and suitable for large-scale production. The process is simple, stable in quality, energy-saving and environmentally friendly, and suitable for large-scale production.