The emergence and spread of methicillin‐resistant Staphylococcus aureus (MRSA) is a major cause of bacterial infections in healthcare. Lysostaphin, a Zn2+‐dependent endopeptidase, hydrolyzes the glycine (G)‐linked pentapeptide bridge in the pathogen Staphylococcus aureus. In this study, the stability of lysostaphin was improved by engineering the addition of disulfide bonds around the protein’s Zn2+ binding site through molecular dynamics simulation. Further mutagenesis to add polyG at the C‐terminus yielded combination variant 319/252‐G3, which was 2.6‐fold more stable than lysostaphin after 30 min at 60°C. Optimization of the C‐terminal glycine number produced variant 319/252‐G6, which retained 67.3% of its antimicrobial activity after 30 min at 70°C, and could be resistant to milk pasteurization conditions. Based on this, a probiotic strain of Escherichia coli Nissle 1917 to constitutively express and secrete lysostaphin from a mutated lac operator was engineered, resulting in effective control and prevention of S. aureus contamination in milk. One possible biotechnological application to utilize lysostaphin and probiotic strains can be used in animal feed and food additives for the prevention and treatment of S. aureus infections.