A fluorescent probe for specific biorecognition was prepared by a facile method in which amphiphilic random copolymers were encapsulated with hydrophobic upconversion nanoparticles (UCNPs). This method quickly converted the hydrophobic UCNPs to hydrophilic UNCPs. Moreover, the self-folding ability of the amphiphilic copolymers allowed the formation of molecular imprinting polymers with template-shaped cavities. LiYF4:Yb3+/Tm3+@LiYF4:Yb3+ UCNP with up-conversion emission in the visible light region was prepared; this step was followed by the synthesis of an amphiphilic random copolymer, poly(methacrylate acid-co-octadecene) (poly(MAA-co-OD)). Combining the UCNPs and poly(MAA-co-OD) with the templates afforded a micelle-like structure. After removing the templates, UCNPs encapsulated with the molecularly imprinted polymer (MIP) (UCNPs@MIP) were obtained. The adsorption capacities of UCNPs@MIP bound with albumin and hemoglobin, respectively, were compared. The results showed that albumin was more easily bound to UCNPs@MIP than to hemoglobin because of the effect of protein conformation. The feasibility of using UCNPs@MIP as a fluorescent probe was also studied. The results showed that the fluorescence was quenched when hemoglobin was adsorbed on UCNPs@MIP; however, this was not observed for albumin. This fluorescence quenching is attributed to Förster resonance energy transfer (FRET) and overlap of the absorption spectrum of hemoglobin with the fluorescence spectrum of UCNPs@MIP. To our knowledge, the encapsulation approach for fabricating the UCNPs@MIP nanocomposite, which was further used as a fluorescent probe, might be the first report on specific biorecognition.