The chemokine receptor 4/chemokine ligand 12 (CXCR4/CXCL12) axis plays an important role in tumorigenesis, metastasis, and recurrence of tumors. Its single nucleotide polymorphisms (SNPs) are associated with patient survival in several types of cancer. However, the prognostic value of SNPs in nasopharyngeal carcinoma (NPC) has not been fully investigated. This retrospective study assessed the relationships between CXCR4 rs2228014 and CXCL12 rs1801157 polymorphisms and patient outcome in 222 patients newly diagnosed with NPC. The analysis found no significant correlation between the presence of both SNPs and clinicopathological factors. However, univariate analysis showed that N classification, clinical stage, and the CXCL12 rs1801157 polymorphism were significantly associated with distant metastasis-free survival (P=0.018, 0.028, and 0.013, respectively) and progression-free survival (P=0.007, 0.046, and 0.021, respectively). After adjusting clinicopathological factors, multivariate analysis identified CXCL12 rs1801157 as an independent prognostic factor for distant metastasis-free survival and progression-free survival (hazard ratio: 3.332; 95% confidence interval: 1.597–6.949; P=0.001 and hazard ratio: 2.665 95% confidence interval: 1.387–5.119; P=0.003, respectively). Our results suggest that CXCL12 rs1801157 AA genotype might serve as a potential prognostic factor in patients with NPC.