Purpose: This study evaluated the efficacy and safety of nivolumab plus gemcitabine in patients with platinum failed NPC. Patients and Methods: This is a phase II, multicenter, open-label, single-arm study. Patients with recurrent or metastatic NPC received nivolumab 3 mg/kg and gemcitabine 1,250 mg/m2 every 2 weeks until disease progression or intolerable toxicity. The primary endpoint was progression-free survival (PFS). The secondary endpoints included objective response rate (ORR), overall survival (OS), and safety. To identify potential biomarkers, whole-exome sequencing, whole-transcriptome sequencing, and immune phenotype analysis based on Lunit SCOPE IO, an artificial intelligence-powered spatial tumor-infiltrating lymphocyte analyzer, were performed. Results: Thirty-six patients were enrolled between June 2018 and June 2019. The ORR was 36.1% and disease control rate was 97.2%. Median PFS was 13.8 months (95% confidence interval [CI]: 8.6–16.8 months). Median OS was not reached, and OS rate at 6 months was 97.0% (95% CI: 80.4%–99.6%). The grade ≥3 treatment-related adverse events were hypertension (2.8%) and anemia (2.8%). In multivariate analysis of mutation of chromatin modifier gene, TMB (≥2.1 mut/Mb), and somatic copy number alteration (SCNA) level, group with high-SCNA (>3 points) (hazard ratio 7.0, 95% CI 1.3-37.9, P = 0.02) had independently associated with poor PFS. Immune phenotype (IP) analysis showed that tumors with high proportion of immune-excluded IP was correlated with poor PFS (hazard ratio 4.4, 95% CI 1.2-16.2, P = 0.018). Conclusions: Nivolumab plus gemcitabine showed promising efficacy with favorable toxicity profiles in patients with advanced NPC in whom platinum-based combination chemotherapy failed.