Essential oils (EOs) have promising applications as natural and environmentally friendly antimicrobial agents. Preparation of EOs into emulsions can improve the properties of EOs. The aim of this study was to investigate the mechanism underlying the antibacterial effects of Zanthoxylum bungeanum pericarp essential oil (ZBEO) against Staphylococcus aureus, Escherichia coli, Bacillus cereus, and Shigella boydii, and to determine the effect of nanoemulsions on antibacterial activity. ZBEO efficiently suppressed foodborne pathogenic bacteria, as determined by the minimum inhibitory concentration and survival rate. Based on analyses of bacterial morphology, the degree of leakage of proteins and nucleic acids, and lactate dehydrogenase activity, we found that ZBEO disrupted the integrity and permeability of cell membranes, resulting in the leakage of cellular contents and apoptotic cell death. Prepared ZBEO nanoemulsion (ZBEO-NE) had good dispersion and stability. Both ZBEO and ZBEO-NE inhibited the growth of S. aureus, E. coli, B. cereus, and Sh. boydii in mutton broth, and ZBEO-NE exhibited better inhibitory effects than those of ZBEO. These findings suggest that preparing EOs in the form of nanoemulsions improves the antibacterial properties of EOs, making them suitable for food applications.