A carbon dot (CD) was prepared by o-phenylenediamine and water, which showed bright yellow fluorescence under ultraviolet light irradiation (λ = 580nm), and verified good fluorescence quenching effect on penicillin G sodium (Png-Na). Using methacrylic acid as a functional monomer, ethylene glycol dimethacrylate as a crosslinker, and Png-Na as a template, a kind of composite microsphere combining CD and molecularly imprinted polymer (MIP) was synthesized by surface-initiated atomic transfer radical polymerization (SI-ATRP). For reasons ofcomparison, we also prepared MIP without CD and non-imprinted polymers (NIPs). Through static and dynamic adsorption experiments, the maximum adsorption capacity was 47.05mgg-1 and the equilibrium time was 30min. High-performance liquid chromatography (HPLC) was utilized to determine the content of Png-Na in the spiked milk samples. A sensitive, rapid, and simple method for determination of Png-Na in food samples was developed. The utilized approach enabled the quantification of Png-Na within theconcentration range 20-1000μg L-1 (with a limit of detection of 5μg L-1). The recoveries achieved were in the range 93.3-98.2%, with a relative standard deviation of 1.2-4.2%. The results demonstrated that CD@MIP possessed the capability of specific adsorption and fluorescence detection of Png-Na, enabling simultaneous detection and enrichment of Png-Na in real samples.