OBJECTIVE: To evaluate the risk of cancers with and without a known infectious cause in HIV-infected persons. DESIGN: Retrospective cohort study. METHODS: Adult HIV-infected and matched HIV-uninfected members of Kaiser Permanente followed between 1996 and 2007 for incident AIDS-defining cancers (ADCs), infection-related non-AIDS-defining cancers (NADCs; anal squamous cell, vagina/vulva, Hodgkin’s lymphoma, penis, liver, human papillomavirus-related oral cavity/pharynx, stomach) and infection-unrelated NADC (all other NADCs). RESULTS: We identified 20 277 HIV-infected and 202 313 HIV-uninfected persons. HIV-infected persons experienced 552 ADC, 221 infection-related NADC, and 388 infection-unrelated NADC. HIV-uninfected persons experienced 179 ADC, 284 infection-related NADC, and 3418 infection-unrelated NADC. The rate ratio comparing HIV-infected and HIV-uninfected persons for ADC was 37.7 [95% confidence interval (CI): 31.7-44.8], with decreases in the rate ratio over time (P < 0.001). The rate ratio for infection-related NADC was 9.2 (95% CI: 7.7-11.1), also with decreases in the rate ratio over time (P < 0.001). These results were largely influenced by anal squamous cell cancer and Hodgkin's lymphoma. The rate ratio for infection-unrelated NADC was 1.3 (95% CI: 1.2-1.4), with no change in the rate ratio over time (P = 0.44). Among infection-unrelated NADCs, other anal, skin, other head and neck, and lung cancer rates were higher and prostate cancer rates lower in HIV-infected persons. Among all infection-unrelated NADCs, the rate ratio decreased over time only for lung cancer (P = 0.007). CONCLUSION: In comparison with those without HIV infection, HIV-infected persons are at particular risk for cancers with a known infectious cause, although the higher risk has decreased in the antiretroviral therapy era. Cancers without a known infectious cause are modestly increased in HIV-infected persons compared with HIV-uninfected persons.