BackgroundThere is ongoing debate about surgery of primary site in nasopharyngeal carcinoma patients.Methods3919 patients with nasopharyngeal carcinoma identified in the SEER registry between 2004 and 2013. The benefit of surgery of primary nasopharynx tumor site on overall and cancer-specific survival was assessed by risk-adjusted multivariate Cox proportional hazard regression and propensity score matching modeling.ResultsSurgery was marginally associated with better overall survival (hazard ratio (HR) = 0.816, 95% CI 0.656–1.015, p = 0.07) and cancer-specific survival (HR = 0.749, 95% CI 0.552–1.018, p = 0.06) in the propensity score model. Among 398 cases who underwent primary site surgery, 282 (70.85%) received local tumor excision and 79 (20.31%) received pharyngectomy. Local tumor excision and pharyngectomy had almost the same effect on survival in propensity score matching analysis. The benefit was significant in subgroups of white, age <60 year, and patients with T3, N1, M0, AJCC stage III, or moderately differentiated tumors. Further survival analysis showed surgery to promote survival in both radiotherapy and non-radiotherapy patients.ConclusionThis is the first population-based analysis using propensity score model to provide evidence of a positive impact of surgery on survival in nasopharyngeal carcinoma. Moreover, surgery demonstrated the significant benefit in subgroups of patients with specific clinical characteristics.Electronic supplementary materialThe online version of this article (doi:10.1186/s12967-017-1204-x) contains supplementary material, which is available to authorized users.