Tuberculosis (TB) is one of the leading cause of infection-related deaths worldwide. Conventional diagnostic methods for TB require infectious samples and are time-consuming. In this study, we aimed to develop an aptamer-based qPCR (Apta-qPCR) assay to diagnose TB safely and rapidly. The assay uses a single-stranded DNA aptamer with affinity for a TB biomarker, ESAT6, and molecular beacon capable of hybridizing to the aptamer. Apta-qPCR enables aptamer-mediated detection of ESAT6 via qPCR, wherein the aptamer serves as both a target recognition agent and template for quantification. This diagnostic method achieved a desirable detection limit of 2.03 nM in buffer and 2.56 nM in serum-spiked conditions with high reproducibility and reliability. In addition, the diagnostic performance was verified in a clinical application using human serum samples from normal controls and patients with active TB. The assay showed 50.0% sensitivity, 91.7% specificity, and 78.1% accuracy, similar to sputum smear microscopy, which is currently the most used method for TB diagnosis. Importantly, this assay has an advantage over smear microscopy in that it reduces the risk of infection by avoiding the use of sputum-containing infectious pathogens.