Herein, luminescent metal-organic framework (LMOF) is modified with molecularly imprinted polymer (MIP) and employed as an efficient and cost-effective nanoprobe for the determination of 4-nitrophenol (4-NP). Amine-UiO-66 support with unique luminescence property is chosen for creating the template of 4-NP using MIP to construct a highly selective LMOF-based sensor (amine-UiO-66/MIP nanocomposite). The imprinted sites formed at the surface of LMOF significantly enhance the selectivity of the probe for 4-NP over its analogs. 4-NP can effectively quench the fluorescent intensity of the optical sensor via the Förster resonance energy transfer (FRET) mechanism. Amine-UiO-66/MIP sensor provided the linear range of 0.05–50 μM and low limit of detection of 0.009 μM for sensing of 4-NP. The application of probe for the fluorometric analysis of real samples, including drinking and environmental water, provided satisfactory recovery results with low relative standard deviation (RSD).