Cellular response to environmental, physiological, or chemical stress is key to survival following injury or disease. Here we describe a unique signaling mechanism by which cells detect and respond to stress in order to survive. A wide variety of stress stimuli rapidly increase nucleocytoplasmic protein modification by O-linked beta-N-acetylglucosamine (O-GlcNAc), an essential post-translational modification of Ser and Thr residues of metazoans. Blocking this post-translational modification, or reducing it, renders cells more sensitive to stress and results in decreased cell survival; and increasing O-GlcNAc levels protects cells. O-GlcNAc regulates both the rates and extent of the stress-induced induction of heat shock proteins, providing a molecular basis for these findings.