Melatonin (MT) is an indoleamine hormone that can counteract ischemia-induced organ injury through its antioxidant effects. The aim of the present study was to investigate the protective effects of exogenous MT against hemorrhagic shock (HS)-induced hepatic ischemic injury in rats, and the role of the nuclear factor (NF)-κB signaling pathway in this process. A rat model of HS-induced hepatic ischemic injury was established. The serum levels of alanine aminotransferase (ALT), aspartate aminotransferase (AST), lactate dehydrogenase (LDH), glutamate dehydrogenase (GDH), tumor necrosis factor (TNF)-α, interferon (IFN)-γ, interleukin (IL)-6 and IL-1β were measured every 6 h, and the 24-h survival rate of the rats was analyzed. All surviving rats were sacrificed after 24 h. Pathological changes in the liver and the hepatocyte apoptosis rate were observed by hematoxylin and eosin staining and TUNEL assay, respectively, and the expression levels of NF-κB p65 and NF-κB inhibitor α (IκBα) were analyzed by reverse transcription-quantitative PCR analysis and western blotting. The results demonstrated that the serum levels of ALT, AST, LDH, GDH, TNF-α, IFN-γ, IL-6 and IL-1β gradually increased after HS compared with those in rats subjected to a sham procedure, but this increase was attenuated by MT. Furthermore, the survival rate of the MT group was significantly higher compared with that of the HS group. The degree of pathological hepatic injury, the hepatocyte apoptosis rate, and the hepatic levels of TNF-α, IFN-γ, IL-6 and IL-1β were significantly decreased in the MT group compared with the HS group. In addition, the mRNA expression of NF-κB p65 was significantly decreased and the mRNA expression of IκBα was significantly increased in the MT group compared with the sham group. Furthermore, the NF-κB p65 protein levels in the MT group were significantly increased in the cytosol but decreased in the nucleus, and the IκBα protein levels were increased while those of phosphorylated IκBα were decreased compared with those in the HS group. Therefore, it may be inferred that exogenous MT alleviates HS-induced hepatic ischemic injury in rats via the inhibition of NF-κB activation and IκBα phosphorylation.