This study evaluated the inhibitory effects of samples extracted by different solvents from bayberry on eight common foodborne pathogens and investigated the main bacteriostatic components of bayberry extracts using ultraviolet and ultraperformance liquid chromatographic-electrospray mass spectrometry. Among the different solvent extracts, the waterextracted sample (BE1) had the greatest average inhibition zone diameter for the tested foodborne pathogens, which reached 22.1 mm. Among them, Salmonella paratyphi, Listeria innocua, and Listeria monocytogenes were most sensitive to BE1, and the lowest minimal inhibitory concentration value was 2.07 mg/mL. The polyphenol content in BE1 was the highest at 24.11 mg/mL. In addition, the main bacteriostatic component in BE1 was identified as cyanidin 3-O-glucoside. As natural antimicrobial agents, the antimicrobial compounds in berries are likely to have many important applications in food and medical industries in the future.