O-GlcNAcylation has been implicated in the tumorigenesis of various tissue origins, but its function in liver tumorigenesis is not clear. Here, we demonstrate that O-GlcNAcylation can enhance the expression, stability and function of Yes-associated protein (YAP), the downstream transcriptional regulator of the Hippo pathway and a potent oncogenic factor in liver cancer. O-GlcNAcylation induces transformative phenotypes of liver cancer cells in a YAP-dependent manner. An O-GlcNAc site of YAP was identified at Thr241, and mutating this site decreased the O-GlcNAcylation, stability, and pro-tumorigenic capacities of YAP, while increasing YAP phosphorylation. Importantly, we found via in vitro cell-based and in vivo mouse model experiments that O-GlcNAcylation of YAP was required for high-glucose-induced liver tumorigenesis. Interestingly, a positive feedback between YAP and global cellular O-GlcNAcylation is also uncovered. We conclude that YAP O-GlcNAcylation is a potential therapeutic intervention point for treating liver cancer associated with high blood glucose levels and possibly diabetes.