Some prevention strategies, including vaccines and antibiotic alternatives, have been developed to reduce enterotoxigenic Escherichia coli proliferation in animal production. In this study, a wild-type strain of BE311 with a virulent heat-stable enterotoxin gene identical to E. coli K99 was isolated for its high potential for gene expression ability. The whole genome of E. coli BE311 was sequenced for gene analyses and editing. Subsequently, the fluorescent gene mCherry was successfully knocked into the genome of E. coli BE311 by CRISPR/Cas9. The E. coli BE311–mCherry strain was precisely quantified through the fluorescence intensity and red colony counting. The inflammatory factors in different intestinal tissues all increased significantly after an E. coli BE311–mCherry challenge in Sprague–Dawley rats (p < 0.05). The heat-stable enterotoxin gene of E. coli BE311 was knocked out, and an attenuated vaccine host E. coli BE311-STKO was constructed. Flow cytometry showed apoptotic cell numbers were lower following a challenge of IPEC-J2 cells with E. coli BE311-STKO than with E. coli BE311. Therefore, the E. coli BE311–mCherry and E. coli BE311-STKO strains that were successfully constructed based on the gene knock-in and knock-out technology could be used as ideal candidates in ETEC challenge models and for the development of attenuated vaccines.