Cancer cells are known to adopt aerobic glycolysis in order to fuel tumor growth, but the molecular basis of this metabolic shift remains largely undefined. O-GlcNAcase (OGA) is an enzyme harboring O-linked β-N-acetylglucosamine (O-GlcNAc) hydrolase and cryptic lysine acetyltransferase activities. Here, we report that OGA is upregulated in a wide range of human cancers and drives aerobic glycolysis and tumor growth by inhibiting pyruvate kinase M2 (PKM2). PKM2 is dynamically O-GlcNAcylated in response to changes in glucose availability. Under high glucose conditions, PKM2 is a target of OGA-associated acetyltransferase activity, which facilitates O-GlcNAcylation of PKM2 by O-GlcNAc transferase (OGT). O-GlcNAcylation inhibits PKM2 catalytic activity and thereby promotes aerobic glycolysis and tumor growth. These studies define a causative role for OGA in tumor progression and reveal PKM2 O-GlcNAcylation as a metabolic rheostat that mediates exquisite control of aerobic glycolysis.