Chloramphenicol was chosen as the imprinting molecule and the methacrylic acid was chosen as the functional monomer to prepare molecularly imprinted polymers. Ethylene glycol dimethacrylate, pentaerythritol triacrylate, and trimethylolpropane trimethylacrylate were used as the cross‐linking agents, respectively. The interaction processes between chloramphenicol and methacrylic acid were simulated by using the ωB97XD/6‐31G (d,p) method. The self‐assembled configuration, bonding sites, binding number, binding energy, and interaction principle of stable complex formed by chloramphenicol and methacrylic acid with different molar ratios have been studied. The selectivity of the most stable complex formed from chloramphenicol and methacrylic acid was discussed with the thiamphenicol and florfenicol as the analogues of chloramphenicol. The results showed that chloramphenicol and methacrylic acid were interacted through the hydrogen bonds. When the molar ratio was 1:10 and pentaerythritol triacrylate as the cross‐linking agent, the ordered complex formed by chloramphenicol and methacrylic acid has the largest amount of hydrogen bonds and the lowest binding energy. Scatchard analysis showed that the maximum apparent adsorption capacity was 173.3 mg/g (0.536 mol/g), and the selection factor of florfenicol was the largest. This study provides a reliable theoretical and experimental basis for the design, preparation, and characterization of chloramphenicol molecularly imprinted polymers.