To investigate the characteristics of Clostridioides difficile infection (CDI) in patients hospitalized for diarrhea and analyze the risk factors for CDI. Stool samples were collected from 306 patients with diarrhea hospitalized in 3 university hospitals in a mid-south city of China from October to December, 2020. C. difficile was isolated by anaerobic culture, and qRT-PCR was used to detect the expressions of toxin A (tcdA) and B (tcdB) genes and the binary toxin genes (cdtA and cdtB). Multilocus sequence typing (MLST) was performed for the isolated strains without contaminating strains as confirmed by 16S rDNA sequencing. Etest strips were used to determine the drug resistance profiles of the isolated strains, and the risk factors of CDI in the patients were analyzed. CDI was detected in 25 (8.17%) out of the 306 patients. All the patients tested positive for tcdA and tcdB but negative for the binary toxin genes. Seven noncontaminated C. difficile strains with 5 ST types were isolated, including 3 ST54 strains and one strain of ST129, ST98, ST53, and ST631 types each, all belonging to clade 1 and sensitive to metronidazole and vancomycin. Hospitalization within the past 6 months (OR= 3.675; 95% CI: 1.405-9.612), use of PPIs (OR=7.107; 95% CI: 2.575-19.613), antibiotics for ≥1 week (OR=7.306; 95% CI: 2.274-23.472), non-steroidal anti-inflammatory drugs (OR=4.754; 95% CI: 1.504-15.031) in the past month, and gastrointestinal disorders (OR=5.050; 95% CI: 1.826-13.968) were all risk factors for CDI in the patients hospitalized for diarrhea. The CDI rate remains low in the hospitalized patients with diarrhea in the investigated hospitals, but early precaution measures are recommended when exposure to the risk factors is reported to reduce the risk of CDI in the hospitalized patients.