Chronic endoplasmic reticulum (ER) stress results in a defective unfolded protein response and is associated with a variety of pathologies, including metabolic syndrome. Using two novel high-throughput screening systems that measure ER chaperone availability and activity, Fu et al. identify the small molecule azoramide as a modulator of ER function. In vitro, azoramide protected against chemically induced ER stress, and in mouse obesity models the compound improved liver ER function, insulin sensitivity and glucose tolerance, preserving pancreatic β-cell function and survival.