Enterohemorrhagic Escherichia coli O157:H7 is an important foodborne pathogen that forms biofilms. In this study, three quorum-sensing (QS) inhibitors (M414-3326, 3254-3286, and L413-0180) were obtained through virtual screening, and their in vitro antibiofilm activities were validated. Briefly, the three-dimensional structure model of LuxS was constructed and characterized using the SWISS-MODEL. High-affinity inhibitors were screened from the ChemDiv database (1,535,478 compounds) using LuxS as a ligand. Five compounds (L449-1159, L368-0079, M414-3326, 3254-3286, and L413-0180) with a good inhibitory effect (50% inhibitory concentration <10 μM) on type II QS signal molecule autoinducer-2 (AI-2) were obtained using a AI-2 bioluminescence assay. The absorption, distribution, metabolism, excretion, and toxicity (ADMET) properties predicated that the five compounds had high intestinal absorption levels (high) and plasma protein binding (absorbent strong) and did not inhibit the metabolism of CYP2D6 metabolic enzymes. In addition, molecular dynamics simulation showed that compounds L449-1159 and L368-0079 could not stably bind with LuxS. Thus, these compounds were excluded. Furthermore, surface plasmon resonance results showed that the three compounds could specifically bind to LuxS. IN addition, the three compounds could effectively inhibit the biofilm formation without affecting the growth and metabolism of the bacteria. Finally, the reverse transcription-quantitative PCR results showed that the three compounds downregulated the expression of the LuxS gene. Overall, these results revealed that the three compounds obtained through virtual screening could inhibit biofilm formation of E. coli O157:H7 and are potential LuxS inhibitors that can be used to treat E. coli O157:H7 infections. IMPORTANCE E. coli O157:H7 is a foodborne pathogen of public health importance. Quorum sensing (QS) is a form of bacterial communication that can regulate various group behaviors, including biofilm formation. Here, we identified three QS AI-2 inhibitors (M414-3326, 3254-3286, and L413-0180) that can stably and specifically bind to LuxS protein. The three QS AI-2 inhibitors inhibited biofilm formation without affecting the growth and metabolic activity of E. coli O157:H7. The three QS AI-2 inhibitors are promising agents for treating E. coli O157:H7 infections. Further studies to identify the mechanism of the three QS AI-2 inhibitors are needed to develop new drugs to overcome antibiotic resistance.