Provided is a lyase that can kill staphylococcus and a use thereof, wherein the amino acid sequence and the encoding gene sequence of the enzyme are disclosed. The enzyme has an activity of lysing staphylococcus at pH 4-11, and can be a recombined soluble expression by gene construction in E. coli BL21 (DE3). The enzyme can be used as an antibiotic for treating staphylococcus infections in vivo.