Purpose: We aimed to investigate the effect of celecoxib on rats with liver cancer through the extracellular signal regulated kinase (ERK)/c-Jun N-terminal kinase (JNK)/p38 pathway. Methods: Sprague-Dawley rats (n=36) were divided into 3 groups (n=12 per group) randomly. In model group, the liver cancer model was established, and normal saline was intraperitoneally injected. In celecoxib group, the liver cancer model was also established, and celecoxib was intraperitoneally injected. After intervention for 30 d, the samples were taken. The body weight of rats was measured before modeling and before sampling. The morphology of liver tissues was observed via hematoxylin-eosin (HE) staining, the expressions of related proteins and messenger ribonucleic acids (mRNAs) were determined via Western blotting and quantitative polymerase chain reaction (qPCR), respectively, and the protein expressions of cysteinyl aspartate specific proteinase 3 (Caspase3) and Cyclin D1 in liver tissues were detected. Results: Before modeling, there was no difference in the body weight of rats among groups. Before sampling, the body weight of rats was smaller in model group and celecoxib group than that in normal group, while it was larger in celecoxib group than that in model group. It was observed using HE staining that the morphology of liver tissues was normal in normal group, it was disordered, with a large number of tumor cells in model group, and it was a little disordered but improved in celecoxib group compared with that in model group. Furthermore, the protein expression of phosphorylated ERK (p-ERK) significantly rose, while the relative protein expressions of p-JNK and p-p38 significantly declined in the other two groups compared with those in normal group. Compared with those in model group, the relative protein expression of p-ERK obviously declined, while the relative protein expressions of p-JNK and p-p38 obviously rose in celecoxib group. It was found via qPCR that the relative mRNA expression of Caspase3 was markedly lower, while that of Cyclin D1 was markedly higher in the other two groups than those in normal group. The relative mRNA expression of Caspase3 was markedly higher, while that of Cyclin D1 was markedly lower in celecoxib group than those in model group. In addition, according to the results of ELISA, the relative protein expression of Caspase3 greatly declined, while that of Cyclin D1 greatly rose in the other two groups compared with those in normal group. The relative protein expression of Caspase3 greatly rose, while that of Cyclin D1 greatly declined in celecoxib group compared with those in model group. Finally, the results of TUNEL assay showed that the apoptosis rate was remarkably decreased in the other two groups compared with that in normal group, while it was remarkably increased in celecoxib group compared with that in model group. Conclusion: Celecoxib affects the apoptosis of liver cancer cells through regulating the ERK/JNK/p38 signaling pathway, thereby exerting an anti-tumor effect.