This study aimed to develop a suitable dosage form of volatile oil from wampee leaves and to explore its antibacterial mechanism in vitro. The chemical composition of the volatile oil from wampee leaves was determined by gas chromatography-mass spectrometry (GC-MS). Different microemulsion ratios were tested and their stabilities were investigated to determine the optimal ratio. The minimum inhibitory concentration (MIC) and minimum bactericidal concentration (MBC) of the wampee leaves volatile oil emulsion (WVOE) against Salmonella typhimurium (S. typhimurium) and Staphylococcus aureus (S. aureus) were determined using double-dilution and plate-counting methods, respectively. Morphological changes in these two bacteria were observed using scanning electron microscopy. Death, ultrastructural morphology, and biofilm formation were also assessed for S. aureus. Finally, we established an S. aureus-infected Lewis lung carcinoma (LLC) cell model to evaluate the protective effects of the volatile oil emulsion and the associated mechanisms. The volatile oil extracted from wampee leaves contained 37 compounds, of which 96.49% were aromatic hydrocarbons, terpenoids, and their oxygen-containing derivatives. The emulsion was most stable at 1:1 in the oil phase and 1:9 in the water phase. WVOE had poor antibacterial activity against S. typhimurium, but the MIC and MBC against S. aureus were 312.5 and 2,500 μg/mL, respectively. S. aureus survival rates were 84.6%, 14.5%, and 12.8% in the 1/2, 1, and 4 × MIC groups, respectively, compared with 97.2% in the control group. S. typhimurium survival was not affected by WVOE treatment. WVOE administration induced cavity formation and abnormal binary fission, and significantly inhibited biofilm formation in S. aureus cells. The WVOE notably reduced the number of S. aureus and inhibited TLR4, NLRP3, NF-κB, IL-6, IL-18, and TNF-α gene expression in S. aureus-infected LLC cells. The WVOE had a significant inhibitory effect on S. aureus and altered its cell membrane permeability. Moreover, it alleviated inflammation by inhibiting the NF-κB-NLRP3 pathway in S. aureus-infected LLC cells.