Mortierella alpina is a mold fungus that has gained attention for its positive correlation with soil health, plant growth, and applications as a crop biocontrol agent to suppress the threats of nematode pests. To date, the mechanisms underlying the protective traits of M. alpina against these plant parasites have remained elusive. Here we report that abundantly produced peptidic biosurfactants, malpinin A-D, exhibit robust inhibitory activity against nematodes. Nematode assays with malpinin congeners and chemically synthesized analogues revealed that the dehydro amino acid is critical for activity, whereas the N-terminal amino acid residues modulate the lipophilicity. Complementary imaging by fluorescence microscopy and Raman microspectroscopy, using externally fluorescence-labeled, semisynthetic malpinin or a biosynthetically alkyne-tagged probe generated by precursor-directed biosynthesis, visualized the translocation and enrichment of malpinin in the gut of the model nematode Caenorhabditis elegans. Our findings provide valuable insight into the use of M. alpina as a biocontrol agent, emphasizing the ecologically significant role of malpinins as a protective trait. In addition to solving a long-standing riddle, these findings have translational value for applications in agriculture.