Cocaine as a detrimental addictive drug threats human health through inducing heart problem, blood pressure, anxiety, immunodeficiency, paranoia, and organ damage. Thus, the quantification of cocaine in the biological samples by a simple, high specificity, and fast method is highly urgent to decrease the harmful effect of the misuse of this drug. In this study, we constructed a novel fluorescent aptasensor by combining the fluorescein (FAM)-modified specific aptamer and AuNPs in a capillary tube as the sensing substrate for the first time. The presence of cocaine recovered the fluorescence response of the aptasensor through interaction with the aptamer and differentiation of the aptamer@AuNPs complex. By fluorescence microscopy imaging of the aptasensor substrate and its quantitative analysis, a remarkable linear range from 100 pM to 600 µM and the ultra-low limit of detection (LOD) as 0.31 pM were achieved for the target detection. Cocaine was successfully quantified in the real samples (human serum and urine) by using the aptasensor. The aptasensor is simple, easy-to-use, favorable applicability, and cost-effective; and to the best of our knowledge, it is the first use of the capillary tube as a sensing platform just by using about 3 μl of the samples. It is also an easy-to-carry tool, promising for the on-site target detection. Besides, it can be a portable device for monitoring cocaine by using a handheld single-beam fluorescence microscope. It can be an appropriate detection tool in forensic science and medicine.