The successful management of tuberculosis (TB) requires efficient diagnosis and treatment. Further, the increasing prevalence of drug-resistant TB highlights the urgent need to develop novel inhibitors against both drug-susceptible and drug-resistant forms of disease. Malate synthase (MS), an enzyme of the glyoxylate pathway, plays a vital role in mycobacterial persistence, and therefore it is considered as an attractive target for novel anti-TB drug development. Recent studies have also ascribed an adhesin function to MS and established it as a potent diagnostic biomarker. In this study, a panel of Mycobacterium tuberculosis (Mtb) MS-specific single-stranded DNA aptamers was identified by Systematic Evolution of Ligands by EXponential enrichment (SELEX). The best-performing G-quadruplex-forming 44-mer aptamer, MS10, was optimized post-SELEX to generate an 11-mer aptamer, MS10-Trunc. This aptamer was characterized by various biochemical, biophysical, and in silico techniques. Its theranostic activity toward Mtb was established using enzyme inhibition, host cell binding, and invasion assays. MS10-Trunc aptamer exhibited high affinity for MS (equilibrium dissociation constant [KD] ∼19 pM) and displayed robust inhibition of MS enzyme activity with IC50 of 251.1 nM and inhibitor constant (Ki) of 230 nM. This aptamer blocked mycobacterial entry into host cells by binding to surface-associated MS. In addition, we have also demonstrated its application in the detection of tuberculous meningitis (TBM) in patients with sensitivity and specificity each of >97%.