Globally, phytonematodes cause significant crop losses. Understanding the functions played by the plant rhizosphere soil microbiome during phytonematodes infection is crucial. This study examined the distribution of phytonematodes in the paddy fields of five provinces in Thailand, as well as determining the keystone microbial taxa in response to environmental factors that could be considered in the development of efficient biocontrol tactics in agriculture. The results demonstrated that Meloidogyne graminicola and Hirschmanniella spp. were the major and dominant phytonematodes distributed across the paddy fields of Thailand. Soil parameters (total P, Cu, Mg, and Zn) were the important factors affecting the abundance of both nematodes. Illumina next-generation sequencing demonstrated that the levels of bacterial diversity among all locations were not significantly different. The Acidobacteriota, Proteobacteria, Firmicutes, Actinobacteriota, Myxococcota, Chloroflexi, Verrucomicrobiota, Bacteroidota, Gemmatimonadota, and Desulfobacterota were the most abundant bacterial phyla observed at all sites. The number of classes of the Acidobacteriae, Clostridia, Bacilli, and Bacteroidia influenced the proportions of Hirschmanniella spp., Tylenchorhynchus spp., and free-living nematodes in the sampling dirt, whereas the number of classes of the Polyangia and Actinobacteria affected the amounts of Pratylenchus spp. in both roots and soils. Soil organic matter, N, and Mn were the main factors that influenced the structure of the bacterial community. Correlations among rhizosphere microbiota, soil nematodes, and soil properties will be informative data in considering phytonematode management in a rice production system.