The invention discloses a microbial preparation, and specifically discloses a microbial preparation prepared from pig-derived bacillus licheniformis YHSH-02, and an application of the microbial preparation to aquaculture. The strain disclosed by the invention is preserved in the China General Microbiological Culture Collection Center of China Committee for Culture Collection of Microorganisms at No. 3, No. 1 yard, Beichen West Road, Chaoyang district, Beijing, the preservation number is CGMCC NO.15454, and the preservation date is 15th March, 2018. The bacillus licheniformis YHSH-02 disclosedby the invention is separated from intestines of wild boars, can produce rich small peptide, lipopeptide type bacillin, antibacterial protein and the like, can restrain growth of various aquaculture pathogenic bacteria of vibrio parahaemolyticus, edwardsiella tarda, aeromonas hydrophila, pseudoalteromonas nigrifaciens, vibrio vulnificus and the like, and can be used for preventing and treating aquaculture diseases caused by various bacteria of the vibrio parahaemolyticus, the edwardsiella tarda, the aeromonas hydrophila, the pseudoalteromonas nigrifaciens, the vibrio vulnificus and the like. The situation that the microbial preparation can effectively prevent and treat black-foot diseases of prawns is found for the first time, an effective scheme is provided for preventing and treating theblack-foot diseases of the prawns, and the microbial preparation has important significance. The bacillus licheniformis YHSH-02 obtained from the intestines of the wild boars is a bacterial strain which is high in preventing and treating efficiency, wide in preventing and treating range and notable in growth promotion and has biological preventing and treating potential, and has favorable application and development prospects.