Acute pancreatitis (AP) is a serious disease characterized by the activation of trypsin, autodigestion, edemas, hemorrhages and necrosis. However, the mechanisms of regulating the apoptosis and inflammation of acinar cells in AP remain unclear. The endoplasmic reticulum (ER) stress-related molecule, c/EBP homologous protein (cHOP), has pro-apoptotic and pro-inflammatory properties, in addition to regulating ER stress responses. In the present study, a lentivirus-mediated RNA interference (RNAi) approach was used to specifically knockdown the expression of cHOP in the pancreatic tissue of Sprague-dawley rats to investigate the potential role of cHOP during AP, which was induced by the retrograde injection of 5% taurocholate into the biliopancreatic duct of rats. Pre-treatment with melatonin was further used to identify the potential anti-inflammatory mechanisms in AP. Pancreatic tissues were procured for western blot analysis, histological examination, reverse transcription-quantitative polymerase chain reaction and immunohistochemical staining. ER stress was rapidly activated in the early stage and increased over time in the rat AP model. However, the silencing of cHOP expression markedly inhibited apoptosis and ER stress, reducing the activation of nuclear factor-κB and inflammation injury in AP. Melatonin also exhibited anti-inflammatory and apoptotic effects, and significantly decreased the expression of cHOP. Thus, it can be concluded that the cHOP-mediated pathway serves an important role in the development of AP, and that melatonin can reduce pancreatic damage via the inhibition of cHOP expression.