Tuberculosis (TB), caused by Mycobacterium tuberculosis (Mtb), continues to pose a significant global health threat. Identifying new druggable targets is crucial for the advancement of drug development. Equally critical is the development of precise methods for monitoring Mtb to effectively combat this disease. Addressing these needs, our study pinpointed the pore domain (PD) of MtbMmpL3 as a new binding site for virtual screening, which led to the discovery of the small molecule ZY27. To confirm the binding site and action mode of ZY27, we employed cosolvent molecular dynamics (CMD), steered molecular dynamics (SMD), and long timescale molecular dynamics (MD) simulations of 5 μs. These in silico studies verified that ZY27 binds to the PD of MtbMmpL3. In antimicrobial activity tests, ZY27 exhibited potent anti-Mtb activity and high selectivity among mycobacterial species. Whole-genome sequencing of spontaneous ZY27-resistant Mtb variants, complemented by acid-fast staining experiments, confirmed that ZY27 specifically targets MtbMmpL3. Utilizing the ligand-protein binding data, we designed and synthesized two solvatochromic fluorescent probes, 27FP1 and 27FP2, based on ZY27. Further investigations through flow cytometry and confocal microscopy confirmed that these probes specifically label Mtb cells via the MtbMmpL3 binding mechanism.