Bacillus subtilis strain NCD-2 is a promising biocontrol agent for soil borne plant diseases. A previous study indicated that strain NCD-2 could produce surfactin and fengycin simultaneously. In this study, the exact roles of surfactin and fengycin in strain NCD-2 against cotton verticillium wilt were determined by knockout of the surfactin synthetase gene srfAA and the fengycin synthetase gene fenC. Compared to the wild-type strain NCD-2, the fengycin-deficient mutant ΔFenC decreased the antifungal ability toward Verticillium dahliae, but the surfactin-deficient mutant ΔSrfAA mainly decreased the swarming and biofilm formation abilities of strain NCD-2. Comparatively, the fengycin and surfactin double mutant ΔFenC/SrfAA decreased the antifungal activity and swarming and biofilm formation abilities to more significant levels. The colonization abilities of the wild type strain NCD-2 and its derivative mutants were compared in the cotton rhizosphere. Compared to the wild-type strain NCD-2, ΔSrfAA and ΔFenC/SrfAA exhibited the poorest colonization ability. RT-qPCR results confirmed that knockout of the srfAA and fenC genes decreased the expression of biofilm formation-related genes. The biocontrol abilities of the strains against cotton verticillium wilt were evaluated in a greenhouse. All mutants decreased the biocontrol abilities against cotton verticillium wilt, while ΔFenC/SrfAA showed the poorest biocontrol ability, followed by ΔFenC. Taken together, fengycin was the main antifungal active compound, and surfactin affected root colonization. Both the antifungal ability and root colonization of strain NCD-2 played important roles in suppressing cotton verticillium wilt.