Fungal diseases present a significant threat to global agriculture, necessitating the development of new, safe, and effective fungicides. Existing fungicides face resistance and health risks, prompting the synthesis of novel compounds. Researchers have synthesized aldehyde-based thiourea and thiazolyl hydrazine derivatives, evaluating their antifungal activities to identify impactful pesticide molecules. The results showed that most of the compounds had broad-spectrum antifungal activity against six plant pathogenic fungi and four post-harvest fungi. Notably, compound LN18 showed the best antifungal activity against Monilinia fructicola with a half-maximal effective concentration (EC50) of 0.17 μg mL-1, which was better than the commercial fungicide natamycin. A structure-activity relationship (SAR) study showed that the presence of unsaturated double bonds in the structure and the length of the carbon chain were the main factors affecting antifungal activity. The presence of unsaturated double bonds and an increase in the length of the carbon chain greatly improved inhibitory activity against the tested pathogens. The preliminary mechanism study showed that LN18 could damage the integrity of the mycelial plasma membrane, leading to leakage of intracellular nucleic acid and protein. LN18 also induced an increase in the intracellular reactive oxygen species level to exert its antifungal effects. In addition, compound LN18 had a stronger antifungal effect in vivo, and better phytotoxicity than natamycin, indicating broad application prospects in agriculture. Aldehydes-thiourea and thiazolyl hydrazine derivatives demonstrate remarkable antifungal efficacy against plant pathogenic and post-harvest fungi, offering a promising avenue for commercialization as highly efficacious, cost-effective and safe antifungal agents. © 2024 Society of Chemical Industry.