The objective of this study was to investigate the control effect of organophosphorus nematicide fosthiazate on cucumber plant parasitic nematode and to explore the impact of fosthiazate treatment on the bacterial and fungal communities within the rhizosphere. The results of a cucumber pot experiment indicated that fosthiazate treatment significantly reduced the root-knot index to 7.1, which is much lower than the control group's index of 85.7. The microbial community analysis revealed that the fosthiazate treatment altered the composition of the rhizosphere soil microbial community and reduced microbial diversity. The predominant species in the rhizosphere soil from different treatment groups were determined, and the results indicated that the fosthiazate treatment decreased the abundance of Pseudomonas and Flavobacterium among bacteria, while increasing the abundance of Sphingomonadales and Novosphingobium. In the fungal community, there was a reduction in the abundance of Hypocreales and Nectriaceae, accompanied by an increase in Olpidium. Predictive analyses using PICRUSt2 demonstrated that bacterial metabolic pathways were generally upregulated in the fosthiazate treatment group. Additionally, FUNGuild predictions indicated a significant decrease in the abundance of Animal Pathogen pathways. These findings provide a scientific basis for the development of more environmentally friendly nematode management strategies based on the rhizosphere microbiome. The findings provide a novel understanding of the control mechanism of an organophosphorus nematicide for plant parasitic nematodes that leverage the rhizosphere microbiome. This understanding offers a scientific foundation for the development of more environmentally sustainable nematode management strategies.