Given a serious threat of multidrug-resistant bacterial pathogens to global healthcare, there is an urgent need to find effective antibacterial compounds to treat drug-resistant bacterial infections. In our previous studies, Bacillus velezensis CB6 with broad-spectrum antibacterial activity was obtained from the soil of Changbaishan, China. In this study, with methicillin-resistant Staphylococcus aureus as an indicator bacterium, an antibacterial protein was purified by ammonium sulfate precipitation, Sephadex G-75 column, QAE-Sephadex A 25 column and RP-HPLC, which demonstrated a molecular weight of 31.405 kDa by SDS-PAGE. LC–MS/MS analysis indicated that the compound was an antibacterial protein CB6-C, which had 88.5% identity with chitosanase (Csn) produced by Bacillus subtilis 168. An antibacterial protein CB6-C showed an effective antimicrobial activity against gram-positive bacteria (in particular, the MIC for MRSA was 16 μg/mL), low toxicity, thermostability, stability in different organic reagents and pH values, and an additive effect with conventionally used antibiotics. Mechanistic studies showed that an antibacterial protein CB6-C exerted anti-MRSA activity through destruction of lipoteichoic acid (LTA) on the cell wall. In addition, an antibacterial protein CB6-C was efficient in preventing MRSA infections in in vivo models. In conclusion, this protein CB6-C is a newly discovered antibacterial protein and has the potential to become an effective antibacterial agent due to its high therapeutic index, safety, nontoxicity and great stability.