In this work,the molecularly imprinted polymers(MIPs) for chloramphenicol(CAP)(CAP-MIPs) were prepared by ionic liquids assistance using 2-vinylpyridine as functional monomer,ethylene glycol dimethacrylate(EGDMA) as the cross-linker and 2,2′-azobisisobutyronitrile(AIBN) as the initiator in the mixture of tetrahydrofuran and ionic liquid 1-butyl-3-methylimidazolium tetrafluoroborate([BMIm]BF4) as the porogenic solvent.The effects of functional monomer,progenic solvent on the binding capacity of MIPs were optimized.The MIPs possessed a high capacity and a favorable selectivity for CAP in the preparation of MIPs using 2-vinylpyridine as functional monomer and ionic liquid([BMIm]BF4)(1∶1,by volume) as polymeric solvent.The imprinting factor of CAP-MIPs reached to 2.6.The reusability of CAP-MIPs without any deterioration in capacity was demonstrated for five adsorption-desorption cycles.The developed method was applied in the enrichment and determination of CAP in spiked egg samples using CAP-MIPs as the adsorbent,with CAP recoveries of 62.3%-81.1%.