Perfluorooctanoic acid (PFOA) is a persistent pollutant that is hazardous and bioaccumulates, seriously harming both the environment and humans. However, detecting PFOA in a sensitive, affordable and pollution–free way remains a challenge. This work combines up–conversion luminescent materials and molecularly imprinted polymers (MIPs) to prepare up–conversion molecularly imprinted fluorescent probe NH2–NaYF4: Yb3+, Ho3+@MIP, using NaYF4:Yb3+, Ho3+ as the luminescent signal source with a mesoporous structure. The PFOA and the probes generate fluorescence quenching based on the F–F interaction and electrostatic adsorption. This can sensitively detect 0.05–15 nmol/l PFOA in aqueous solution. This work provides a fresh and practical method for detecting PFOA in aqueous solutions.