Cover crop integration into grain crop rotations is a promising strategy for mitigating nematode-induced diseases in agriculture. However, the precise mechanisms underlying this phenomenon remain elusive. Here, we first assessed the impact of five commonly used cover crops on the suppression of rice root-knot nematodes (RKNs). We then chose ryegrass as a model to explore the mechanistic basis of the suppression effect. Contrary to expectations, while ryegrass rotation significantly enhances soil fertility, this increased fertility has minimal impact on RKN suppression. Furthermore, neither integrated ryegrass residues nor root exudates exhibit direct toxicity towards RKNs. We demonstrated that ryegrass rotation primarily suppresses RKNs by enriching beneficial soil microbiota. By complementing with isolated bacteria strains, we further demonstrated that ryegrass-enriched bacteria not only directly reduce RKN infectivity and preference, but also activate plant immunity via the OsLRR-RLK-MAPK-WRKY-JA cascade, thereby diminishing RKN infection. Our study highlights the crucial role of soil microbiota in plant-nematode interactions, challenging conventional views on the direct effects of cover crops in nematode suppression. It offers a mechanistic understanding of the regulation potential and action modes of cover crops in mitigating nematode diseases, providing valuable insights for sustainable agriculture.