The invention discloses a Bacillus subtilis WB8 capable of producing diosgenin, and belongs to the technical field of applied microbiology. The strain is separated from internal issues of subterraneous stems of a medicinal plant of Dioscorea zingiberensis wright, can synthesize and secrete a metabolin of a host plant, namely diosgenin, and has the preservation number of CCTCC (China Center For Type Culture Collection) NO:M2010271; and the strain is rod-like, has the size of 1-1.5*3-5 mu m, forms a single-chain sporocarp, releases endospore, has rough colony with grid bulges, forms pellicle through liquid fermentation, has rich foam, and can grow 16SrDNA core sequence 1542bp with the thermophilic temperature of between 30 and 35 DEG C, the pH of 6.0-9.0 and capacity of tolerating 9.0 percent NaCl, wherein the core sequence has the sequence number of HM210636. The strain liquid is fermented by a common culture medium for 48 to 60 hours, the chloroform extract of the fermentation liquor is the diosgenin, and the diosgenin has the activity of inhibiting pathogenic bacteria and resisting tumor cells. The strain provided by the invention can produce the diosgenin; and compared with the conventional process of extracting the diosgenin from yam plants, the method avoids the pollution of strong acid and yam byproducts on environment, and has potential industrial application prospect.