This study aimed to investigate the effects of different environmental factors (temperature, pH, and NaCl) and food matrices (skimmed milk powder, lecithin, and sucrose) on the antibacterial activity of theaflavins (TFs) againstStaphylococcus aureus(S. aureus) andSalmonella paratyphi B(S. paratyphi B). TFs showed a larger diameter of inhibition zone (DIZ, 12.58 ± 0.09 mm–16.36 ± 0.12 mm) value againstS. aureusthan that ofS. paratyphi B(12.42 ± 0.43 mm–15.81 ± 0.24 mm) at the same concentration (2–10 mg/mL). When temperatures were 25–121 °C, the DIZ of TFs against bothS. aureusandS. paratyphi Bwas not significantly different. As pH increased from 2 to 10, their DIZ values decreased significantly from 16.78 ± 0.23 mm to 13.43 ± 0.08 mm and 15.63 ± 0.42 mm to 12.18 ± 0.14 mm, respectively. Their DIZ values increased slightly as the NaCl concentration increased from 0.2 mol/L to 0.8 mol/L, while their DIZ values decreased significantly for skimmed milk powder concentrations in the range of 20–120 g/L. Regarding the concentrations of lecithin and sucrose were 2–12 g/L and 10–60 g/L, their DIZ values showed no significant change againstS. paratyphi B, but an increased trend forS. aureus. Under the above different environmental factors and food matrices, TFs maintained excellent antibacterial activity againstS. aureusandS. paratyphi B, providing a theoretical guidance for applying TFs as novel antibacterial additives in the food industry.