Phytopathogenic fungi jeopardize global food security through crop devastation and postharvest mycotoxin contamination, necessitating the urgent development of novel antifungals to mitigate agricultural losses and ameliorate health risks. To address these challenges, novel tryptamine derivatives incorporating α,β-unsaturated amide or hydrazide moieties were developed as new fungicide candidates. Notably, compound B16 demonstrated potent broad-spectrum antifungal efficacy against serious phytopathogenic fungi, showing an optimal EC50 value of 0.34 μg mL-1 against Sclerotinia sclerotiorum. Mechanistic studies revealed that B16 strongly interacted with fungal sterol 14α-demethylase (CYP51), resulting in compromised membrane integrity, altered permeability, and subsequent fungal mortality. The compound demonstrated exceptional in vivo control efficacy (up to 82.9%) and favorable pharmacokinetic properties, collectively supporting its application potential. This study establishes tryptamine derivatives as a novel chemotype of CYP51 inhibitors through integrated computational prediction and experimental validation, highlighting their substantial potential in combating fungal diseases and enhancing food security.