Gastric cancer, one of the most common malignancies worldwide, typically has a poor prognosis and poor survival rate. Previous studies have investigated the chemopreventive effect of celecoxib. In the present study, the SGC-7901 human gastric cancer cell line was utilized to examine the chemopreventive mechanisms of celecoxib. The inhibition of cell proliferation was determined using MTT assay, cell apoptosis was monitored by terminal deoxynucleotidyl transferase-mediated dUTP nick end-labeling (TUNEL) and flow cytometry, and cell ultrastructural changes were assessed via transmission electron microscopy. The mRNA expression of Akt, caspase-8 and -9 was examined using quantitative reverse-transcription-polymerase chain reaction (qRT-PCR) and p-Akt, procaspase-8 and -9 were analyzed via western blotting. The results showed that celecoxib inhibited the proliferation of SGC-7901 cells in a time- and dose-dependent manner. Additionally, celecoxib induced apoptosis as substantiated by typical apoptotic bodies, autophagosomes and an increased apoptotic rate. It was found that following celecoxib treatment, Akt mRNA expression was not significantly altered, and that p-Akt protein levels decreased in a time- and dose-dependent manner. Additionally, caspase-8 and -9 mRNA expression was significantly increased, while procaspase-8 and -9 protein expression decreased relative to the time- and dose-dependent effects. These results demonstrated that celecoxib induced apoptosis and autophagy of gastric cancer cells in vitro through the PI3K/Akt signaling pathway. Moreover, our findings suggested that celecoxib induces apoptosis in gastric cancer cells through the mitochondrial and death receptor pathways, providing additional understanding regarding the chemopreventive behaviors of celecoxib and its uses in cancer therapy.