Nicotine (3-(1-methyl-2-pyrrolidinyl)pyridine) is one of the most common addictive substances, causing the trace detection of nicotine to be very necessary. Herein, we designed and prepared a functionalized nanocomposite CS-PAA (NaYF4:19.5%Yb,0.5%Tm@NaYF4-PAA) using a simple method. The nicotine concentration was quantitatively detected through the inhibition of choline oxidase activity by nicotine and the luminescence intensity of CS-PAA being quenched by Fe3+. The mechanism of Fe3+ quenching CS-PAA emission was inferred by luminescence lifetime and UV-vis absorption spectra characterization. During the nicotine detection, both excitation (980nm) and emission (802nm) wavelengths of CS-PAA enable the avoidance of the interference of background fluorescence in complicated food objects, thus providing high selectivity and sensitivity with a linear range of 5-750ng/mL and a limit of detection of 9.3nM. The method exhibits an excellent recovery and relative standard deviation, indicating high accuracy and repeatability of the detection of nicotine.