In all eukaryotic cell types, the unfolded protein response (UPR) upregulates factors that promote protein folding and misfolded protein clearance to help alleviate endoplasmic reticulum (ER) stress. Yet, ER stress in the liver is uniquely accompanied by the suppression of metabolic genes, the coordination and purpose of which are largely unknown. Here, we combined in silico machine learning, in vivo liver-specific deletion of the master regulator of hepatocyte differentiation HNF4α, and in vitro manipulation of hepatocyte differentiation state to determine how the UPR regulates hepatocyte identity and toward what end. Machine learning identified a cluster of correlated genes that were profoundly suppressed by persistent ER stress in the liver. These genes, which encode diverse functions including metabolism, coagulation, drug detoxification, and bile synthesis, are likely targets of the master regulator of hepatocyte differentiation HNF4α. The response of these genes to ER stress was phenocopied by liver-specific deletion of HNF4α. Strikingly, while deletion of HNF4α exacerbated liver injury in response to an ER stress challenge, it also diminished UPR activation and partially preserved ER ultrastructure, suggesting attenuated ER stress. Conversely, pharmacological maintenance of hepatocyte identity in vitro enhanced sensitivity to stress. Together, our findings suggest that the UPR regulates hepatocyte identity through HNF4α to protect ER homeostasis even at the expense of liver function.