Abstract:[Objective] To evaluate the biocontrol and growth-promoting effects and reveal the antifungal mechanisms of the pepper endophyte Bacillus velezensis XY40-1, thus providing elite bacterial strains and technical support for the development of biocontrol agents for pepper Phytophthora blight. [Methods] Plate confrontation, in vivo inoculation assay, and microscopic observation were employed to determine the biocontrol and growth-promoting effects of B. velezensis XY40-1 on pepper. Genomics and metabolomics methods were adopted to determine the antifungal metabolites of the strain and the synthesis pathways of substances involved in antifungal effects, on the basis of which the antifungal mechanisms were explored. [Results] Strain XY40-1 exhibited strong inhibitory effects on six pathogenic fungi: Phytophthora capsici, Sclerotium rolfsii, Colletotrichum scovillei, Alternaria alternate, Fusarium oxysporum, and F. solani, that infected pepper, and it demonstrated broad-spectrum resistance. The strain suspension at 107 CFU/mL showcased the control effect of 66.13%. Moreover, it possessed the abilities to solubilize phosphorus and potassium and fix nitrogen, thus promoting the growth of pepper seedlings. XY40-1 carried a large number of genes involved in the synthesis of ketone and terpenoid antibiotics, which enabled it to produce extracellular metabolites such as nogalamycin, megalomicin, rifaximin, avermectin ala, avermectin, and ansamitocin P-3 to inhibit pathogenic fungi. The synthesis and degradation of ketone bodies, as well as the biosynthetic pathways of terpenoid skeletons and antibiotics, contributed to the antagonistic function of XY40-1. The core metabolic pathway was the biosynthesis of secondary metabolites. [Conclusion] B. velezensis XY40-1, an endophyte of pepper, possesses excellent biocontrol and growth-promoting effects on pepper, being a multifunctional and high-quality strain for the biocontrol of pepper diseases.