Pine wilt disease (PWD) is a deadly disease to pines (Pinus spp.) worldwide. The occurrence of PWD can reduce the relative abundance of root ectomycorrhizal fungi (ECMF) and dark septate endophytes (DSE). However, the effects of exogenous ECMF/DSE inoculation on the rhizosphere microbial community structure of Pinus tabulaeformis infected by pine wood nematode (PWN) is little known. Here, we tested how ECMF/DSE may improve resistance to PWD by quantifying microbial carbon biomass and soil enzymatic activity among different treatments at 6 and 9 months after PWN infection. Denaturing gradient gel electrophoresis (DGGE) was used to study the microbial community structure at 3, 6, and 9 months after PWN infection in the rhizosphere of P. tabulaeformis seedlings inoculated with ECMF/DSE. The results showed that exogenous ECMF/DSE inoculation reduced the disease severity caused by PWN infection. After PWN infection, the rhizosphere microbial carbon of seedlings inoculated with Amanita vaginata, Suillus bovinus, Gaeumannomyces cylindrosporus, and Paraphoma chrysanthemicola was 38.16, 49.67, 42.11, and 96.05% higher than that of the control group, respectively. Inoculation of ECMF/DSE inhibited the decrease of rhizosphere microbial biomass caused by PWN infection. The richness and diversity of P. tabulaeformis rhizosphere fungi at 9 months were reduced by PWN infection but partially recovered by the exogenous fungi (ECMF/DSE) inoculation except for P. chrysanthemicola, which indicates a role of ECMF/DSE in maintaining stability of the microbial community. Inoculation with ECMF/DSE increased the beneficial bacterial (Thauera sp., Mesorhizobium sp., etc.) and fungal groups (Tomentella ellisii, Wilcoxina mikolae, etc.) of in the rhizosphere. In summary, exogenous ECMF/DSE inoculation could increase P. tabulaeformis resistance to PWD probably by improving the rhizosphere microenvironment.