Homeostasis of intracellular pH is a trait critical for survival of Mycobacterium tuberculosis in macrophages. However, mechanisms by which M. tuberculosis adapts to acidic environments are poorly understood. In this study, we analysed the physiological functions of OmpATb, a surface-accessible protein of M. tuberculosis. OmpATb did not complement the permeability defects of a Mycobacterium smegmatis porin mutant to glucose, serine and glycerol, in contrast to the porin MspA. Uptake rates of these solutes were unchanged in an ompATb operon mutant of M. tuberculosis indicating that OmpATb is not a general porin. Chemical analysis of low-pH culture filtrates showed that the proteins encoded by the ompATb operon are involved in generating a rapid ammonia burst, which neutralized medium pH and preceded exponential growth of M. tuberculosis. Addition of ammonia accelerated growth of the ompATb operon mutant demonstrating that ammonia secretion is indeed a mechanism by which M. tuberculosis neutralizes acidic environments. Infection experiments revealed that the ompATb operon was not required for full virulence in mice suggesting that M. tuberculosis has multiple mechanisms of resisting phagosomal acidification. Taken together, these results show that the ompATb operon is necessary for rapid ammonia secretion and adaptation of M. tuberculosis to acidic environments in vitro but not in mice.