Bacillus subtilis strain NCD-2 is an excellent biocontrol agent for plant soil-borne diseases, and the lipopeptide fengycin is one of the active antifungal compounds in strain NCD-2. The regulator PhoP and its sensor kinase PhoR compose a two-component system in B. subtilis. In this study, the phoR- and phoP-knockout mutants were constructed by in-frame deletion and the role of PhoR/PhoP on the production of fengycin was determined. Inactivation of phoR or phoP in B. subtilis decreased its inhibition ability against Botrytis cinerea growth in vitro compared to the strain NCD-2 wild type. The lipopeptides were extracted from strain NCD-2 wild type and its mutant strains by hydrochloric acid precipitate, and the lipopeptides from phoR-null mutant or phoP-null mutant almost lost the inhibition ability against B. cinerea growth compared to the lipopeptides from strain NCD-2 wild type. Fast protein liquid chromatography (FPLC) analysis of the lipopeptides showed that inactivation of phoR or phoP genes reduced the production of fengycin by strain NCD-2. The fengycin production abilities were compared for bacteria under low-phosphate medium (LPM) and high-phosphate medium (HPM), respectively. Results indicated that the regulation of fengycin production by the PhoR/PhoP two-component system occurred in LPM but not in HPM. Reverse transcriptional-PCR confirmed that the fengycin synthetase gene fenC was positively regulated by phoP when cultured in LPM. All of these characteristics could be partially restored by complementation of intact phoR or phoP gene in the mutant. These data indicated that the PhoR/PhoP two-component system greatly regulated fengycin production and antifungal ability in B. subtilis NCD-2 mainly under low-phosphate conditions.