Ammonia is a major aquatic environmental pollutant that negatively impacts shrimp health and commercial productivity. However, we currently do not fully understand the underlying molecular mechanisms of ammonia stress in shrimp. We therefore performed transcriptomic analysis of hepatopancreas from black tiger shrimp (Penaeus monodon) treated with ammonia-stress. We obtained 146,410,174 and 115,241,048 clean reads for the control and treatment groups, respectively. A total of 64,475 unigenes with an average length of 1275 bp and a N50 value of 2158 bp were assembled. A comparative transcriptome analysis identified 3462 differentially expressed genes, 177 of which are highly homologous with known proteins in aquatic species. Most of these genes showing the expression changes were related to immune function. Some significantly down-regulated genes are involved in purine metabolism and other metabolic pathways, which suggests that purineolytic capacity is an ammonia detoxification process in P. monodon, and metabolic depression is a strategy to reduce shrimp exposure to ammonia. Additionally, ammonia stress altered the expression patterns of key apoptosis genes (Bcl-xL, PERK, caspase 7, and caspase 10), confirmed that ammonia-stress induce oxidative stress and eventually even apoptosis. We also found evidence for the involvement of antioxidant defense in response to oxidative imbalance, given the regulation of peroxiredoxin 1, SOD, and CAT under ammonia stress. In conclusion, our study clarifies shrimp defensive response to ammonia toxicity and should benefit efforts to breed more ammonia-tolerant varieties.