Escherichia coli O157:H7 and Salmonella enterica are foodborne pathogens that pose serious threats to pork safety and human health, highlighting the urgent need for effective and safe food preservatives. In this study, a novel antimicrobial peptide (AMP) named KRR-N1-5W6L was developed by modifying a natural AMP, N1, derived from buffalo colostrum whey. KRR-N1-5W6L exhibited potent antibacterial activity against E. coli O157:H7 and S. enterica with a minimum inhibitory concentration (MIC) of 32 mu M, significantly lower than that of N1 (MIC >256 mu M). Furthermore, KRR-N1-5W6L demonstrated remarkable thermal stability, pH stability (pH 6-9), and sensitivity to salts and proteases. Comprehensive analyses using multiple fluorescence probes, scanning electron microscopy (SEM), and transmission electron microscopy (TEM) revealed that KRR-N1-5W6L disrupted the cell membranes of E. coli O157:H7 and S. enterica, leading to increased permeability of both outer and inner membranes, leakage of cellular contents, and dissipation of the proton motive force. Additionally, KRR-N1-5W6L was found to bind to DNA and induce the accumulation of intracellular reactive oxygen species (ROS) in both pathogens. Molecular docking studies indicated that KRR-N1-5W6L can bind to DNA gyrase via hydrogen bonds, thereby inhibiting pathogen growth. Moreover, KRR-N1-5W6L effectively delayed the quality deterioration of pork during storage at 4 degrees C, as evidenced by measurements of TVC, pH, TBARS, and color changes. These findings suggest that KRR-N1-5W6L holds promise as a potential food preservative for pork preservation.