Under multiple stresses of deep sea, many microorganisms have evolved potentials to produce different metabolites to cope with the stresses they face. In this study, we isolated a bacterial strain Bacillus sp. YJ17 from the deep-sea cold seep. Compared with commercial food preservative nisin, it showed broad and strong antibacterial activities against foodborne pathogens, including multiple resistant bacteria Pseudomonas aeruginosa PAO1 and methicillin-resistant Staphylococcus aureus (MRSA). The active agents were purified by reversed-phase high performance liquid chromatography (RP-HPLC). Analysis of high-energy collision induced dissociation mass spectrometry (HCD-MS) showed that the two active agents belong to family of fengycin and surfactin, and based on results of tandem mass spectrometry (HCD-MS/MS), the amino acid sequence of purified fengycin and surfactin might be Glu-Orn-Tyr-Thr-Glu-Val-Pro-Gln-Tyr-Ile and Glu-Leu/Ile-Leu/Ile-Leu/Ile-Val-Asp-Leu/Ile, respectively. Since the purified fengycin and surfactin exhibited strong inhibition against P. aeruginosa PAO1 and MRSA respectively, the inhibition mechanisms of fengycin against P. aeruginosa PAO1 and surfactin against MRSA were investigated by electron microscopy. After treatment with purified fengycin, the morphology of P. aeruginosa PAO1 became abnormal and aggregated together, and obvious cytoplasmic leakage was observed. After treatment with purified surfactin, the MRSA cells clustered together, and cell surface became rough and jagged. Further study showed that reactive oxygen species (ROS) accumulation and cell membrane damage occurred in P. aeruginosa PAO1 and MRSA after treated with fengycin and surfactin, respectively. Furthermore, typical ROS scavenging enzymes catalase (CAT) and superoxide dismutase (SOD) were also significantly reduced in P. aeruginosa PAO1 and MRSA after treated with fengycin and surfactin, respectively. Therefore, the inhibition mechanisms of fengycin against P. aeruginosa PAO1 and surfactin against MRSA are closely related with accumulation of ROS, which might be due to the decreased activity of CAT and SOD after treated with fengycin and surfactin, respectively. Overall, our study provides good candidates from the deep-sea environment to deal with foodborne pathogens, especially multidrug-resistant bacteria.