Plant-parasitic nematodes pose a significant threat to crop production, impacting agricultural yields. In the search for new nematicides, a series of 1,2,4-oxadiazole-5-carboxylic acid derivatives containing amide or ester groups were designed and synthesized using an activity-based approach. Bioassay results showed that some compounds exhibited good nematicidal activity against Meloidogyne incognita, Aphelenchoides besseyi, and Bursaphelenchus xylophilus. Especially, compound f1 showed excellent nematicidal activity against A. besseyi with an LC50 value of 19.0 μg/mL at 48 h, outperforming tioxazafen (LC50 = 149 μg/mL) and fosthiazate (LC50 > 300 μg/mL). In semi-in vivo and pot experiments, compound f1 demonstrated superior nematicidal activity compared to fosthiazate against A. besseyi while also being safe for rice seeds. The mechanism of action revealed that compound f1 could inhibit the population and behavior of A. besseyi, damage the nematode cuticle, resulting in fluid leakage, affect the production of reactive oxygen species, lipofuscin, and lipids in nematodes, and inhibit acetylcholinesterase in A. besseyi. These findings suggest that compound f1 has the potential to be a safe and effective seed treatment nematicide.