To reduce the bitterness of florfenicol, avoid its degradation by gastric acid, and enhance its antibacterial activity against Escherichia coli by targeting and slowly releasing drugs at the site of intestinal infection, with pectin as an anion carrier and chitosan oligosaccharides (COS) as a cationic carrier, florfenicol-loaded COS@pectin core nanogels were self-assembled by electrostatic interaction and then encapsulated in sodium carboxymethylcellulose (CMCNa) shell nanogels through the complexation of CMCNa and Ca2+ to prepare florfenicol core–shell composite nanogels in this study. The florfenicol core–shell composite nanogels were investigated for their formula choice, physicochemical characterization, pH-responsive performances, antibacterial activity, therapeutic efficacy, and in vitro and in vivo biosafety studies. The results indicated that the optimized formula was 0.6 g florfenicol, 0.79 g CMCNa, 0.30 g CaCl2, 0.05 g COS, and 0.10 g pectin, respectively. In addition, the mean particle diameter, polydispersity index, zeta potential, loading capacity, and encapsulation efficiency were 124.0 ± 7.2 nm, –22.9 ± 2.5 mV, 0.42 ± 0.03, 43.4 % ± 3.1 %, and 80.5 % ± 3.4 %, respectively. The appearance, lyophilized mass, resolvability, scanning electron microscopy (SEM), transmission electron microscopy (TEM), powder X-ray diffraction (PXRD), and fourier transform infrared (FTIR) showed that the florfenicol core–shell composite nanogels were successfully prepared. Florfenicol core–shell composite nanogels had satisfactory stability, rheology, and pH-responsiveness, which were conducive to avoid degradation by gastric acid and achieve targeted and slow release at intestinal infection sites. More importantly, florfenicol core–shell composite nanogels had excellent antibacterial activity against Escherichia coli, a satisfactory therapeutic effect, and good palatability. In vitro and in vivo biosafety studies suggested the great promise of florfenicol core–shell composite nanogels. Therefore, the prepared florfenicol core–shell composite nanogels may be helpful for the treatment of bacterial enteritis as a biocompatible oral administration.