This study aimed to investigate clinical characteristics and survival outcomes of primary cutaneous T-cell lymphoma (CTCL) in HIV-infected and non-HIV-infected patients. All data were from the Surveillance, Epidemiology, and End Results program, 1973–2013, of the U.S. National Cancer Institute. Data of 318 HIV-infected patients and 1272 non-HIV-infected patients with primary CTCL were analyzed. Endpoints were overall survival and cancer-specific mortality. Independent variables included demographics, pre-existing malignancy, treatments, and environmental factors. Among 8823 patients with CTCL, 318 (3.60 per cent) were HIV-infected and 8505 (96.40 per cent) were not. 318 HIV-infected patients and 1272 non-HIV-infected patients selected by matching diagnosis dates were analyzed, including 941 (59.2 per cent) males and 649 (40.8 per cent) females with mean age 58.8 years. HIV-infected patients with CTCL had higher survival and significantly lower risk of overall mortality than non-HIV-infected patients (adjusted HR 0.37, 95 per cent CI 0.24 to 0.59, P<0.001). Non-HIV-infected, age and black race were significant risk factors for overall mortality. Age and race are independent risk factors for overall mortality in primary CTCL individuals, and HIV-infected status is an independent protective factor, suggesting that advanced antiretroviral therapy restores immunity and prolongs survival in HIV-infected patients with CTCL.