In this work, pyrrole-2-carboxamides were designed with a structure-guided strategy based on the crystal structure of MmpL3 and a pharmacophore model. The structure-activity relationship studies revealed that attaching phenyl and pyridyl groups with electron-withdrawing substituents to the pyrrole ring and attaching bulky substituents to the carboxamide greatly improved anti-TB activity. Most compounds showed potent anti-TB activity (MIC < 0.016 μg/mL) and low cytotoxicity (IC<sub>50</sub> > 64 μg/mL). Compound <b>32</b> displayed excellent activity against drug-resistant tuberculosis, good microsomal stability, almost no inhibition of the hERG K<sup>+</sup> channel, and good <i>in vivo</i> efficacy. Furthermore, the target of the pyrrole-2-carboxamides was identified by measuring their potency against <i>M. smegmatis</i> expressing wild-type and mutated variants of the <i>mmpL3</i> gene from <i>M. tuberculosis</i> (<i>mmpL3tb</i>) and determining their effect on mycolic acid biosynthesis using a [<sup>14</sup>C] acetate metabolic labeling assay. The present study provides new MmpL3 inhibitors that are promising anti-TB agents.