Mycobacterium tuberculosis (Mtb) SapM is a secreted virulence factor critical for intracellular survival of the pathogen. The role of SapM in phagosome maturation arrest in host macrophages suggests its potential as a drug target to assist in the clearance of tuberculosis infection. However, the mechanism of action of SapM at the molecular level remains unknown. In this study, we provide new insights into the mechanism of catalysis, substrate specificity and inhibition of SapM, and we identify the critical residues for catalysis and substrate binding. Our findings demonstrate that SapM is an atypical monoester alkaline phosphatase, with a serine-based mechanism of catalysis probably metal-dependent. Particularly relevant to SapM function and pathogenesis, is its activity towards PI(4,5)P2 and PI3P, two phosphoinositides that function at the early stages of microbial phagocytosis and phagosome formation. This suggests that SapM may have a pleiotropic role with a wider importance on Mtb infection than initially thought. Finally, we have identified two inhibitors of SapM, L-ascorbic acid and 2-phospho-L-ascorbic, which define two different mechanisms by which the catalytic activity of this phosphatase could be regulated. Critically, we demonstrate that 2-phospho-L-ascorbic reduces mycobacterial survival in macrophage infections, hence confirming the potential of SapM as a therapeutic drug target.