Aptamers have emerged as promising molecular probes for disease diagnosis and therapy. In the present study, the entire live cell-SELEX method was used to generate gastric cancer cell‑specific aptamers. Human gastric carcinoma AGS cells were used as target cells for positive selections and human normal gastric epithelial GES-1 cells as the negative cells for counter selections. The selection procedure was monitored by gel electrophoresis and flow cytometric analysis. By successive in vitro evolutions and subsequent cloning and sequencing, a gastric carcinoma cell‑specific DNA aptamer termed cy-apt 20 with minimal recognition to the controls was identified from the final enriched ssDNA pool. Flow cytometry binding assays revealed that cy-apt 20 had a >70% binding rate to AGS cells and <30% binding affinity to non-gastric cancer cells. Furthermore, the targeting recognition of AGS cells was established by using minimal doses of FITC-cy-apt 20 that continued for a long period of time. As visualized by fluorescence imaging, the majority of AGS cells were stained by FITC-cy-apt 20. The fluorescence intensity of AGS cells was ~6-fold over that of non-AGS cells. The present study demonstrated that the entire live cell-SELEX was simple, but effective in generating gastric cancer cell‑specific aptamers, and that the aptamer cy-apt 20 has great potential to be used for the study and diagnosis of gastric cancer.