6-Gingerol, the main bioactive compound of ginger, has antioxidant, anti-inflammatory, anti-cancer and neuroprotective effects. However, it is unclear whether 6-Gingerol has protective effects against hepatic ischemia/reperfusion (I/R) injury. In this study, the mouse liver I/R injury model and the mouse AML12 cell hypoxia/reoxygenation (H/R) model were established by pretreatment with 6-Gingerol at different concentrations to explore the potential effects of 6-Gingerol. Serum transaminase levels, liver necrotic area, cell viability, inflammatory response, and cell apoptosis were used to assess the effect of 6-Gingerol on hepatic I/R or cell H/R injury. Quantitative polymerase chain reaction (qPCR) and Western blotting were used to detect the mRNA and protein expression. The results show that 6-Gingerol decreased serum alanine aminotransferase (ALT), aspartate aminotransferase (AST) levels, liver necrosis, inflammatory cytokines IL-1β, IL-6, MCP-1, TNF-α expression, Ly6g+ inflammatory cell infiltration, protein phosphorylation of NF-κB signaling pathway, Terminal deoxynucleotidyl transferase dUTP nick-end labeling (TUNEL) positive cells, cell apoptosis rate, the protein expression of pro-apoptotic protein BAX and C-Caspase3, increased cell viability, and expression of anti-apoptotic protein BCL-2. Moreover, 6-Gingerol could increase the mRNA and protein expression of mitogen activated protein kinase phosphatase 5 (MKP5) and inhibit the activation of P38/JNK signaling pathway. In MKP5 knockout (KO) mice, the protective effect of 6-gingerol and the inhibition of P38/JNK pathway were significantly weakened. Therefore, our results suggest that 6-Gingerol exerts anti-inflammatory and anti-apoptotic effects to attenuate hepatic I/R injury by regulating the MKP5-mediated P38/JNK signaling pathway.