Soil microbes can release volatile organic compounds (VOCs) that influence plant growth and pathogen resistance. Screening these microbial VOCs for their antifungal activity is a new strategy for developing biopesticides. However, the ability of endophytic bacteria to synthesize VOCs is understudied. Here, we characterized VOCs produced by Bacillus velezensis ZSY-1, and tested their antifungal activity against plant pathogenic fungi. Strain ZSY-1, isolated from Chinese catalpa, was identified as B. velezensis, based on sequences of its 16S rRNA, gyrA, and gyrB genes. Bioassay of VOCs from ZSY-1 was conducted using the two-sealed base-plates method. Volatile organic compounds from ZSY-1 exhibited significant antifungal activity against Alternaria solani, Botrytis cinerea, Valsa mali, Monilinia fructicola, Fusarium oxysporum f. sp. capsicum, and Colletotrichum lindemuthianum; the inhibition rates were 81.1%, 93.8%, 83.2%, 80.9%, 76.7%, and 70.6%, respectively. Gas chromatography–mass spectrometry of solid phase microextraction samples (SPME-GC–MS) revealed 29 unique VOCs released by strain ZSY-1. Among these compounds, 2-tridecanone, pyrazine (2,5-dimethyl), benzothiazole, and phenol (4-chloro-3-methyl) had much higher peak areas than the main compound types. However, the most common VOC types were ketones (seven unique compounds), alcohols (six), and alkanes (six). Pyrazine (2,5-dimethyl), benzothiazole, 4-chloro-3-methyl, and phenol-2,4-bis (1,1-dimethylethyl) had significant antifungal activity against A. solani and B. cinerea. In fact, we report for the first time that phenol (4-chloro-3-methyl) synthesized by B. velezensis can inhibit the growth of plant pathogenic fungi. Based on our study of antifungal activity, pyrazine (2,5-dimethyl), benzothiazole, phenol (4-chloro-3-methyl), and phenol-2,4-bis (1,1-dimethylethyl) are promising bioagents for controlling tomato fungal diseases such as early blight and grey mold.