The consumption of illicit drugs such as cannabis, cocaine, and amphetamines is still a major health and social problem, creating an abuse in adults especially. Novel techniques which estimate the drug of abuse are needed for the detection of newly revealed psychoactive drugs. Herein, we have constructed a combinatorial platform by using quantum dots (QDs) and gold nanoparticles (AuNPs) as well as a functional aptamer which selectively recognizes cocaine and its metabolite benzoylecgonine (BE). We have called it an aptamer folding-based sensory device (AFSD). For the fabrication of AFSD, QDs were initially immobilized onto the poly-L-lysine coated -well surfaces. Then, the AuNP-aptamer conjugates were bound to the QDs. The addition of cocaine or BE caused a change in the aptamer structure which induced the close interaction of AuNPs with the QDs. Hence, quenching of the fluorescence of QDs was observed depending on the analyte amount. The linearity of cocaine and BE was 1.0-10 nM and 1.0-25M, respectively. Moreover, the limits of detection for cocaine and BE were calculated as 0.138 nM and 1.66M. The selectivity was tested by using different interfering substances (methamphetamine, bovine serum albumin, codeine, and 3-acetamidophenol). To investigate the use of AFSD in artificial urine matrix, cocaine/BE spiked samples were applied. Also, confirmatory analyses by using high performance liquid chromatography were performed. It is shown that AFSD has a good potential for testing the cocaine abuse and can be easily adapted for detection of various addictive drugs by changing the aptamer according to desired analytes. Copyright (c) 2016 John Wiley & Sons, Ltd.