The invention provides a functional microbial agent for preventing and treating root-knot nematodes, which comprises nitrogen-fixing bacterial agent, biocontrol bacterial agent and carrier, and the mass ratio of the nitrogen-fixing bacterial agent, biocontrol bacterial agent and carrier is 1 to 2.5 : 1.5~5:1, the nitrogen-fixing bacterial agent comprises rhizobia and Azotobacter torus, the ratio of the effective number of viable bacteria of the rhizobia to Azotobacter torus is 1~100:1~200, and the biocontrol Bacteria agent comprises Paecilomyces lilacinus, Verticillium chlamydoides, Bacillus subtilis, Bacillus cereus, the effective activity of said Paecilomyces lilacinus, Verticillium chlamydoides, Bacillus subtilis, Bacillus cereus The bacterial count ratio is 1-100:1-100:1-100:1-100, and the effective viable bacterial count of the functional bacterial agent is greater than 200 million / g. The functional bacterial agent in the present invention is applied to fertilizers, which can increase the disease prevention effect of microbial fertilizers, improve its growth-promoting effect, ensure the nutritional supply of microbial fertilizers in the application process, prevent and control root-knot nematodes, and form healthy root nodules. Promote plant growth, improve crop yield and quality.