Bacillus subtilis S-16 isolated from sunflower-rhizosphere soil is an effective biocontrol agent for preventing soilborne diseases in plants. Previous research revealed that the volatile organic compounds (VOCs) produced by the S-16 strain have strong inhibitory effects on Sclerotinia sclerotiorum. The identification of the VOCs of S-16 using gas chromatography-tandem mass spectrometry (GC-MS/MS) revealed 35 compounds. Technical-grade formulations of four of these compounds were chosen for further study: 2-pentadecanone, 6,10,14-trimethyl-2-octanone, 2-methyl benzothiazole (2-MBTH), and heptadecane. The major constituent, 2-MBTH, plays an important role in the antifungal activity of the VOCs of S-16 against the growth of Sclerotinia sclerotiorum. The purpose of this study was to determine the impact of the thiS gene’s deletion on the 2-MBTH production and to conduct an antimicrobial activity analysis of the Bacillus subtilis S-16. The thiazole-biosynthesis gene was deleted via homologous recombination, after which the contents of 2-MBTH in the wild-type and mutant S-16 strains were analyzed using GC-MS. The antifungal effects of the VOCs were determined using a dual-culture technique. The morphological characteristics of the Sclerotinia sclerotiorum mycelia were examined via scanning-electron microscopy (SEM). Additionally, the lesion areas on the sunflower leaves with and without treatment with the VOCs from the wild-type and mutant strains were measured to explore the effects of the VOCs on the virulence of the Sclerotinia sclerotiorum. Moreover, the effects of the VOCs on the sclerotial production were assessed. We showed that the mutant strain produced less 2-MBTH. The ability of the VOCs produced by the mutant strain to inhibit the growth of the mycelia was also reduced. The SEM observation showed that the VOCs released by the mutant strain also caused more flaccid and gapped hyphae in the Sclerotinia sclerotiorum. The Sclerotinia sclerotiorum treated by the VOCs produced by the mutant strains caused more damage to the leaves than that treated by the VOCs produced by the wild type and the mutant-strain-produced VOCs inhibited sclerotia formation less. The production of 2-MBTH and its antimicrobial activities were adversely affected to varying degrees by the deletion of thiS.