In this paper, a series of oxadiazole/thidiazole containing coumarin derivative derivatives were designed, synthesized and characterized using NMR and HRMS. The evaluation of antiviral activity revealed that some of the synthesized compounds exhibited good in vivo antiviral efficacy against tobacco mosaic virus (TMV). Notably, compounds H6 and Y5 demonstrated exceptional therapeutic and protective effects against TMV, with EC50 values of 180.7, 190.3 and 215.8, 218.6 µg/mL, respectively, surpassing the efficacy of NingNanmycin, which exhibited EC50 values of 284.1 and 247.1 µg/mL. The preliminary mechanistic studies indicated that H6 and Y5 had ahigh binding affinity for the tobacco mosaic virus capsid protein (TMV-CP), potentially obstructing the self-assembly and replication processes of TMV particles. Furthermore, the chlorophyll content and superoxide dismutase (SOD) activity in tobacco leaves increased, while the malondialdehyde (MDA) content decreased. H6 has the potential to be developed as a novel antiviral.