The entry and survival of Mycobacterium tuberculosis (Mtb) within host cells is orchestrated partly by an essential histone-like protein HupB (Rv2986c). Despite being an essential drug target, the lack of structural information has impeded the development of inhibitors targeting the indispensable and multifunctional C-terminal domain (CTD) of HupB. To bypass the requirement for structural information in the classical drug discovery route, we generated a panel of DNA aptamers against HupB protein through systemic evolution of ligands by exponential (SELEX) enrichment. Two G-quadruplex-forming high-affinity aptamers (HupB-4T and HupB-13T) were identified, each of which bound two distinct sites on full-length HupB, with an estimated KD of ∼1.72 μM and ∼0.17 μM, respectively, for the high-affinity sites. While HupB-4T robustly inhibited DNA-binding activity of HupB in vitro, both the aptamers recognized surface-located HupB and significantly blocked Mtb entry into THP-1 monocytic cells (p < 0.0001). In summary, DNA aptamers generated in this study block DNA-binding activity of HupB, inhibit virulent Mtb infection in host cells, and demonstrate aptamers to be inhibitors of HupB functions. This study also illustrates the utility of SELEX in developing inhibitors against essential targets for whom structural information is not available.