Small-molecule carboxyl methyltransferases (CbMTs) constitute a small proportion of the reported methyltransferases, but they have received extensive attention due to their important physiological functions. Most of the small-molecule CbMTs isolated to date originate from plants and are members of the SABATH family. In this study, we identified a type of CbMT (OPCMT) from a group of Mycobacteria, which has a distinct catalytic mechanism from the SABATH methyltransferases. The enzyme contains a large hydrophobic substrate-binding pocket (~400 Å3) and utilizes two conserved residues, Thr20 and Try194, to retain the substrate in a favorable orientation for catalytic transmethylation. The OPCMT_like MTs have a broad substrate scope and can accept diverse carboxylic acids enabling efficient production of methyl esters. They are widely (more than 10,000) distributed in microorganisms, including several well-known pathogens, whereas no related genes are found in humans. In vivo experiments implied that the OPCMT_like MTs was indispensable for M. neoaurum, suggesting that these proteins have important physiological functions.