O-GlcNAc is an essential and dynamic post-translational modification present on thousands of nucleocytoplasmic proteins. Interrogating the role of O-GlcNAc on a target protein in cells is critical yet challenging without disturbing O-GlcNAc globally or after extensive glycosite mapping. Herein, we developed a nanobody-fused split O-GlcNAcase (OGA) as a targeted O-GlcNAc eraser for protein-selective O-GlcNAc removal in cells. Through systematic screening, we identified the essential domains of OGA and afforded a split OGA with limited activity, which selectively reinstated deglycosylation activity on the target protein upon fusion of a nanobody in living cells. We demonstrate the generality of the O-GlcNAc eraser against a series of target proteins and reveal that O-GlcNAc stabilizes the transcription factor c-Jun and promotes its interaction with c-Fos. Thus, nanobody-directed split OGA speeds the selective removal and functional evaluation of O-GlcNAc on individual proteins via an approach that is generalizable to a broader array of post-translational modifications.