Herein, we report a novel fluorescent sensor based on molecularly imprinted polymer-coated upconversion nanoparticles (MIP-coated UCNPs) for the recognition and detection of diethylstilbestrol (DES). We used one-step process to modify the surface of the UCNPs with alkenyl groups, which was not only a simple process, but also greatly saved the preparation time. Then, a molecularly imprinted polymer was synthesized on the UCNPs by the surface-graft molecular imprinting method. MIP-coated UCNPs combine the advantages of UCNPs and molecularly imprinted polymers such as strong fluorescence properties, excellent stability, reusability, good adsorption capacity, and high specificity.After the removal of the template molecules, the UCNPs were able to selectively recognize DES, and the fluorescence intensity decreased as the concentration of DES increased. A good linear relationship was obtained in the concentration range of 50-1000 ng mL À1 with the correlation coefficient of 0.9989, and the detection limit was 12.8 ng mL À1 (S/N ¼ 3). MIP-coated UCNPs could be applied for the detection of DES in real milk samples, and the average recoveries for five different concentrations ranged from 90.3%to 107.8%, with the relative standard deviations (RSD) below 2.7%. This fluorescence sensor provides a more convenient, simple and highly specific method for the on-field detection of DES and is promising for a wide range of applications in the future.