Abstract Background Plant diseases caused by viruses and bacteria cause huge economic losses due to the lack of effective control agents. New potential pesticides can be discovered through biomimetic synthesis and structural modification of natural products. A series of ferulic acid derivatives containing an β-amino alcohol were designed and synthesized, and their biological activities were evaluated. Result Bioassays results showed that the EC50 values of compound D24 against Xanthomonas oryzae pv. oryzae (Xoo) was 14.5 μg/mL, which was better than that of bismerthiazol (BT, EC50 = 16.2 μg/mL) and thiodiazole copper (TC, EC50 = 44.5 μg/mL). The in vivo curative and protective activities of compound D24 against Xoo were 50.5% and 50.1%, respectively. The inactivation activities of compounds D2, D3 and D4 against tobacco mosaic virus (TMV) at 500 μg/mL were 89.1, 93.7 and 89.5%, respectively, superior to ningnanmycin (93.2%) and ribavirin (73.5%). In particular, the EC50 value of compound D3 was 38.1 μg/mL, and its molecular docking results showed that compound D3 had a strong affinity for TMV-CP with a binding energy of − 7.54 kcal/mol, which was superior to that of ningnanmycin (− 6.88 kcal /mol). Conclusions The preliminary mechanism research results indicated that compound D3 may disrupt the three-dimensional structure of the TMV coat protein, making TMV particles unable to self-assemble, which may provide potential lead compounds for the discovery of novel plant antiviral agents. Graphical Abstract