Ammonia is one of major environmental pollutants in the aquatic system that poses a great threat to the survival of shrimp. In the present study, the mRNA expression of endoplasmic reticulum (ER) stress marker and unfolded protein response (UPR) related genes, as well as the change of redox enzyme and apoptosis were investigated in hepatopancreas of the pacific white shrimp, Litopenaeus vannamei after the exposure of 20 mg L−1 total ammonia nitrogen (TAN). Compared with the control group, the superoxide dismutase (SOD) activity in hepatopancreas decreased significantly (p < 0.05) at 96 h, whereas the malonyldialdehyde (MDA) concentration increased significantly (p < 0.05). The mRNA expression levels of ER stress marker-immunoglobulin heavy chain binding protein (Bip) gene and key UPR related genes including activating transcription factor 4 (ATF4) and the spliced form of X box binding protein 1 (XBP1) increased significantly (p < 0.05) in hepatopancreas at 96 h after exposure to ammonia. In addition, apoptosis was observed obviously in the hepatopancreas of L. vannamei after exposure to ammonia by the terminal deoxynucleotidyl transferase-mediated dUTP nick end labeling (TUNEL) assay. The results indicated that ammonia exposure could induce oxidative stress, which further caused ER stress and apoptosis in hepatopancreas of L. vannamei.