In recent years, moleoularly imprinted polymers (MIPs) have attracted considerable interests for their applications in biotechnology. MIPs possess selective and specific cavities for recognition and binding of the target molecules with high affinity and specificity. The interactions between the polymer and the target molecules consist of electrostatic interactions, hydrogen bonds, Van der Waals forces, and hydrophobic interactions. In this study, a luminescent molecular imprinting polymer nanocomposite was prepared via the encapsulation approach. The LiYF4:Yb3+0.25/Er3+0.01/Tm3+0.01/Ho3+0.01@LiYF4:Yb3+0.2 and LiYF4:Yb3+0.25/Tm3+0.01@LiYF4:Yb3+0.2 core/shell upconversion nanoparticles (UCNPs) were prepared as the luminescent nanoparticles by thermal decomposition method. The [Poly(methacrylic acid)-co-octadecene] (P(MAA-co-OD)) copolymer was synthesized as the moleoularly-imprinted polymer and imprinted with the templates of glycine, bovine serum albumin and bovine hemoglobin. The prepared UCNP@P(MAA-co-OD) MIP nanocomposite (MIP-NC) could emit green and red and UV/Vis light respectively. Both luminescent bands could be absorbed by the template molecules and the biomolecules to be recognized. The particle size of MIP-NC determined by dynamic light scattering (DLS) showed that the size was in the range of 1.30 m to 1.95 m. Thermogravimetric analysis (TGA) indicated that the weight ratio of UCNPs in the MIP-NC was ca. 2%. The recognition and re-adsorption effect of the luminescent MIP-NC for the three template molecules after molecular imprinting were determined by the absorption intensity of the ultraviolet-visible (UV/Vis) spectra and photoluminescence (PL) measurements. The prepared MIP-NC was used as a biosensor for recognition of human red blood cells and ractopamine. The UV/Vis analysis showed that the adsorption of human red blood cells by the synthesized MIP-NC was better than that of ractopamine. Photoluminescence spectra and the result of Stern-Volmer equation indicated that the light quenching effect of human red blood cell was higher than that of ractopamine. Therefore, the MIP-NC prepared in this study has a better recognition effect on human red blood cells.