Nuclear and cytoplasmic protein glycosylation is a widespread and reversible posttranslational modification in eukaryotic cells. Intracellular glycosylation by the addition of N-acetylglucosamine (GlcNAc) to serine and threonine is catalyzed by the O-GlcNAc transferase (OGT). This "O-GlcNAcylation" of intracellular proteins can occur on phosphorylation sites, and has been implicated in controlling gene transcription, neurofilament assembly, and the emergence of diabetes and neurologic disease. To study OGT function in vivo, we have used gene-targeting approaches in male embryonic stem cells. We find that OGT mutagenesis requires a strategy that retains an intact OGT gene as accomplished by using Cre-loxP recombination, because a deletion in the OGT gene results in loss of embryonic stem cell viability. A single copy of the OGT gene is present in the male genome and resides on the X chromosome near the centromere in region D in the mouse spanning markers DxMit41 and DxMit95, and in humans at Xq13, a region associated with neurologic disease. OGT RNA expression in mice is comparably high among most cell types, with lower levels in the pancreas. Segregation of OGT alleles in the mouse germ line with ZP3-Cre recombination in oocytes reveals that intact OGT alleles are required for completion of embryogenesis. These studies illustrate the necessity of conditional gene-targeting approaches in the mutagenesis and study of essential sex-linked genes, and indicate that OGT participation in intracellular glycosylation is essential for embryonic stem cell viability and for mouse ontogeny.