The objective of this study was to evaluate the inhibitory effect of lactic acid (LA) and peroxyacetic acid (PAA) on the biofilm formation of Escherichia coliO157:H7 in beef extract (BE). BE medium was used as the growth substrate in this study, to make the control effect closer to the situation of the factory. The biofilm inhibitory efficacy of LA and PAA was tested by using a crystal violet staining assay and microscopic examination. And then, extracellular polymeric substance (EPS) production, metabolic activity, and real-time polymerase chain reaction assay were used to reveal the biofilm inhibition mechanism of LA and PAA. The results showed that both LA and PAA significantly inhibited biofilm formation of E. coliO157:H7 at minimum inhibitory concentrations (MICs) (p< 0.05). At MIC, LA and PAA showed different effects on the biofilm metabolic activity and the EPS production of E. coliO157:H7. Supporting these findings, expression analysis showed that LA significantly suppressed quorum sensing genes (luxSand sdiA) and adhesion genes (flhC), while PAA downregulated the transcription of extracellular polysaccharide synthesis genes (adrBand adrA) and the global regulatory factor csgD. This result revealed that LA and PAA had different biofilm inhibitory mechanisms on E. coliO157:H7; LA inhibited the biofilm formation mainly by inhibiting metabolic activity, while PAA inhibited EPS production. This study provided a theoretical basis for the control of E. coliO157:H7 biofilm in the actual production process.