Diarrhea is the most common issue in sheep farms, typically due to pathogenic Escherichia coli (E. coli) infections, such as E. coli F17. microRNA, a primary type of non-coding RNA, has been shown to be involved in diarrhea caused by pathogenic E. coli. To elucidate the profound mechanisms of miRNA in E. coli F17 infections, methods such as E. coli F17 adhesion assay, colony counting assay, relative quantification of bacterial E. coli fimbriae gene expression, indirect immune fluorescence (IF), Cell Counting Kit-8 (CCK-8), 5-ethynyl-2′-deoxyuridine (EdU), Western blotting (WB), and scratch assay were conducted to investigate the effect of miR-329b-5p overexpression/knock-down on E. coli F17 susceptibility of sheep intestinal epithelial cells (IECs). The findings indicated that miR-329b-5p enhances the E. coli F17 resistance of sheep IECs to E.coli F17 by promoting adhesion between E. coli F17 and IEC, as well as IEC proliferation and migration. In summary, miR-329b-5p plays a crucial role in the defense of sheep IECs against E. coli F17 infection, providing valuable insights into its mechanism of action.