In this study, the novel nanocomposite was prepared by the coating of the semiconductor quantum dots (QDs) with the molecularly imprinted shell by mini-emulsion polymerization to form the specific recognition sites on the surface for the detection of melamine. After the characterization of nanocomposites, the detection performance of the nanosensor was investigated by fluorescence measurements in aqueous solutions and milk samples. The aqueous solutions of melamine were used for the detection of melamine and the optimum conditions were determined as pH 5.0, melamine concentration (100 ppm), interaction time (6 min), and temperature (40 degrees C). The competitor molecules such as aniline, phenol, and cyanuric acid were used to determine the selectivity of the quantum dot-based nanosensor system. The limit of detection (LOD) was obtained as 0.14 +/- 0.08 ppm. The reusability performance was investigated for 20 cycles by using the same nanocomposites and relative standard deviation (RSD) values of the nanosensor system were calculated as 11 % after 20 recycles. According to the results, the nanosensor system has shown that it is a favorable alternative to existing systems for the melamine detection.