Belonging to the field of environmental microorganism application, the invention discloses a Bacillus subtilis strain and application thereof. The strain is named as Bacillus subtilis CM-A12, is currently preserved in China Center For Type Culture Collection (called CCTCC for short) with a preservation number of CCTCC NO:M 2015688, and the preservation date is November 23, 2015. The Bacillus subtilis strain provided by the invention has the advantages of simple cultivation condition, high temperature resistance, acid and alkali resistance, and high salinity resistance, can secrete protease, amylase and cellulase, and can effectively improve water quality and reduce COD and ammonia nitrogen in water.