Oxaliplatin‐based chemotherapy combined with PD‐1 antibody has become the standard treatment for advanced or metastatic gastric cancer. However, the neurotoxicity of oxaliplatin limits its long‐term use. A total of 84 patients who received oxaliplatin‐based chemotherapy plus PD‐1 antibody are enrolled in this study, among which 44 patients are maintained with capecitabine plus PD‐1 antibody, whereas the other 40 patients are maintained with capecitabine monotherapy. The primary endpoint is progression‐free survival (PFS) and the secondary endpoint is overall‐survival (OS). Subgroup analysis is performed based on expression of PD‐L1 and CXCL12. The median PFS is significantly longer in capecitabine plus PD‐1 antibody group (n = 44) than that in capecitabine monotherapy (n = 40) group. The median OS is significantly longer in capecitabine plus PD‐1 antibody group than that in capecitabine monotherapy group. Subgroup analysis showed that patients with high expression of PD‐L1 or low level of CXCL12 benefited more significantly from capecitabine plus PD‐1 antibody maintenance. Maintenance therapy with capecitabine plus PD‐1 antibody significantly prolongs the PFS and OS in patients without disease progression after first‐line treatment. Patients with high expression of PD‐L1 or low expression of CXCL12 benefit more significantly from maintenance therapy.