Clostridioides difficileinfection (CDI) is the leading cause of hospital- acquired diarrhea that seriously threatens public health. The disruption of normal gut microbiota by the use of broad-spectrum antimicrobial agents enablesC. difficileto proliferate in the colon. The emergence and prevalence of hypervirulentC. difficilestrains result in increased morbidity, mortality, and recurrence rates of CDI, thus creating a pressing need for novel therapeutics. The multi-domain toxins TcdA and TcdB are the primary determinants of CDI pathogenesis, rendering them ideal drug targets in the anti-virulence paradigm. In this study, we identified caffeic acid and its derivatives as active inhibitors of TcdB via a cell-based high-throughput phenotypic screening. Further mechanistic investigations revealed that caffeic acid phenethyl ester (CAPE) could directly bind to TcdB, thus suppressing InsP6-induced autoproteolysis and inhibiting glucosyltransferase activity. CAPE treatment remarkably reduces the pathology of CDI in a murine infection model in terms of alleviated diarrhea symptoms, decreased bacterial colonization, and relieved histopathological lesions. Moreover, CAPE treatment of C. difficile-challenged mice induces a remarkable increase in the diversity and composition of the gut microbiota (e.g.,Bacteroides) and alterations of gut metabolites (e.g., adenosine, D-proline, and melatonin), which might partially contribute to the therapeutic outcomes of CAPE against CDI. Our results reveal the potential of CAPE as a therapeutic for the management of CDI, or CAPE might serve as a lead compound for the development of antivirulence drugs targeting TcdB.