The aim of this study was to fabricate a fluorescence sensor based on carbon quantum dots and molecularly imprinted polymer to detect tannic acid. Carbon quantum dots were synthesized using hydrothermal method and citric acid precursor as carbon source and polyethylene amine as nitrogen source. The presence of amine groups led to the synthesis of carbon quantum dots with high quantum yield (24%). Transmission electron microscopy (TEM) images showed the quasi-spherical morphology of carbon quantum dots with an average size of 4.9 nm. XRD results indicated the amorphous structure of these nanoparticles. To increase the selectivity of the synthesized sensor to tannic acid, the molecularly imprinted polymer technique was used, in which a layer of molecularly imprinted polymer was synthesized by surface printing on carbon quantum dots and nanocomposite MIPs/CDs were obtained. In order to evaluate the performance of molecularly imprinted polymer, control nanocomposite NIPs/CDs were synthesized similar to the steps of molecularly imprinted polymer synthesis without adding template molecule. Field emission scanning electron microscopy (FESEM) images of MIPs/CDs and NIPs/CDs nanocomposites showed that both nanocomposites have a spherical structure and the same size. To investigate the optical properties, the emission and absorption spectra of carbon quantum dots and nanocomposite CDs/MIPs were investigated. Fourier transform infrared (FTIR) spectroscopy was performed to investigate the functional groups and to confirm the synthesis of carbon quantum dots and molecularly imprinted polymer. Parameters affecting the sensor response such as pH effect, time effect and nanocomposite amount were optimized. The effect of 12 interfering species on sensor response was also investigated. The results showed that the sensor has good selectivity to tannic acid in the presence of interfering factors. Experiments have shown that the presence of tannic acid reduces the fluorescence intensity of the sensor which is due to the transfer of electrons from the tannic acid to the carbon quantum dot. Under optimal conditions, the linear range of the sensor response was obtained at a concentration of 1-200 nmol L -1 tannic acid and a detection limit of 0.6 nmol L -1 . Finally, the sensor was used to measure tannic acid in grape juice, green tea and black tea samples using the recovery method. Recovery values between 97.4 -103.6% and RSD less than 3.8% were obtained, indicating the appropriateness of the proposed method for the detection of tannic acid in real samples. In general, fluorescence sensors were synthesized with high accuracy and sensitivity to detect tannic acid. Also, comparing the results of the proposed method with other studies reported to measure tannic acid indicates that this method has a better linear range and limit of detection, which indicates its good potential for analytical applications in complex food samples. Key Words : Fluorescence sensor, Carbon quantum dots, Molecularly imprinted polymer, Hydrothermal, Tannic acid