Strain 98 with the activity of inhibiting Botrytis cinerea was screened from the endophytic bacteria of Lilium brownii var. viridulum Baker by plate separation method and plate confrontation method, and the antibacterial rate was 74%. The endophyte strain 98 was identified as Burkholderia gladioli by physiological and biochemical assays and 16S rDNA sequence analysis. The fermentation conditions and the formula of fermentation medium for strain 98 were optimized by single factor and orthogonal tests. The results showed that 100 mL of fermentation medium in 250 mL triangular flasks with pH 7, incubation temperature of 32 ℃, and inoculum size of 6% under shaker incubation at 180 r/min for 5 days resulted in the greatest inhibition activity. The optimized medium was formulated as FeSO4 0.15 g, corn flour 20 g, beef paste 15 g in 1 L water.