In a 250mL three-necked flask equipped with a stirrer, thermometer and reflux condenser tube, 52g of malonic acid (0.5 mol), 73g of freshly distilled heptanal (0.6 mol, content 93.7%) were added, and 16mL of pyridine was added under stirring, and then heated with a water bath and stirred the reaction for 3 hrs at 70C. Removing the water bath, it was heated with an electric heating jacket, and the reaction was continued under reflux for 3 hrs. The reaction was then heated with a water bath and stirred at 70 for 3 h. The reaction was removed from the water bath and heated with an electric heating jacket, and the reaction was continued to stir under reflux for 3 h. After the reaction, when the reaction material was cooled to room temperature, it was transferred to 500mL dispensing funnel, acidified with 25% hydrochloric acid to pH1~2, to remove the pyridine, separated out the upper organic layer, dried with anhydrous magnesium sulfate, and then vacuum distilled, collected 110~144/0.2kPa fractions, and obtained the crude product of trans-2-nonenoic acid, 78.1g, with the content of 82.9%, and the reaction yield was 83% according to the acrylic acid. The reaction yield was 83% according to acrylic acid. After fractionation of the crude product, the content of trans-2-nonenoic acid was 94.5%, and there was 3.5% trans-2-nonenoic acid.