Root-knot nematodes (RKNs) are distributed globally, including in agricultural fields contaminated by heavy metals (HM), and can cause serious crop damages. Having a method that could control RKNs in HMcontaminated soil while limit HM accumulation in crops could provide significant benefits to both farmers and consumers. In this study, we showed that the nematophagous fungus Purpureocillium lavendulum YMF1.683 exhibited a high nematocidal activity against the RKN Meloidogyne incognita and a high tolerance to CdCl2. Comparing to the P. lavendulum YMF1.838 which showed low tolerance to Cd2+, strain YMF1.683 effectively suppressed M. incognita infection and significantly reduced the Cd2+ uptake in tomato root and fruit in soils contaminated by 100 mg/kg Cd2+. Transcriptome analyses and validation of gene expression by RT-PCR revealed that the mechanisms contributed to high Cd-resistance in YMF1.683 mainly included activating autophagy pathway, increasing exosome secretion of Cd2+, and activating antioxidation systems. The exosomal secretory inhibitor GW4869 reduced the tolerance of YMF1.683 to Cd2+, which firstly demonstrated that fungal exosome was involved in HM tolerance. The up-regulation of glutathione synthesis pathway, increasing enzyme activities of both catalase and superoxide dismutase also played important roles in Cd2+ tolerance of YMF1.683. In Cd2+contaminated soil, YMF1.683 limited Cd2+-uptake in tomato by up-regulating the genes of ABCC family in favor of HM sequestration in plant, and down-regulating the genes of ZIP, HMA, NRAMP, YSL families associated with HM absorption, transport, and uptake in plant. Our results demonstrated that YMF1.683 could be a promising bio-agent in eco-friendly management of M. incognita in Cd2+ contaminated soils.