O-GlcNAcylation is a dynamic post-translational modification that diversifies the proteome with spatiotemporal precision in response to various stimuli. Its dysregulation is associated with many neurological disorders that impair cognitive function, and yet identification of phenotype-relevant protein substrates in specific brain regions remains unfeasible. By combining O-GlcNAc binding activity of Clostridium perfringens OGA (CpOGA) with TurboID proximity labeling, we developed an O-GlcNAcylation profiling tool that translates O-GlcNAc modification into biotin conjugation for tissue-specific substrates enrichment. We mapped the O-GlcNAcylated proteome in different brain regions of Drosophila and revealed that components in translational machinery including many ribosomal subunits are heavily O-GlcNAcylated in mushroom body (MB), the major brain region for associative learning. Hypo-O-GlcNAcylation induced by ectopic expression of CpOGA in MB reduces ribosomal activity, leading to olfactory learning deficit. Our study provides a useful resource for dissecting tissue-specific functions of O-GlcNAcylation in Drosophila and suggests that new protein synthesis is important for cognitive function.