People living with AIDS are at increased risk of developing certain cancers. Since the introduction of the highly active antiretroviral therapy (HAART), the incidence of AIDS-defining cancers (ADCs) has decreased in high-income countries. The objective of this study was to analyse trends in ADCs and non-AIDS-defining cancers (NADCs) in HIV-positive people with a diagnosis of AIDS, in comparison to the general population, in São Paulo, Brazil. A probabilistic record linkage between the ‘Population-based Cancer Registry of São Paulo’ and the AIDS notification database (SINAN) was conducted. Cancer trends were assessed by annual per cent change (APC). In people with AIDS, 2074 cancers were diagnosed. Among men with AIDS, the most frequent cancer was Kaposi’s sarcoma (469; 31.1%), followed by non-Hodgkin lymphoma (NHL; 304; 20.1%). A decline was seen for ADCs (APC = −14.1%). All NADCs have increased (APC = 7.4%/year) significantly since the mid-2000s driven by the significant upward trends of anal (APC = 24.6%/year) and lung cancers (APC = 15.9%/year). In contrast, in men from the general population, decreasing trends were observed for these cancers. For women with AIDS, the most frequent cancer was cervical (114; 20.2%), followed by NHL (96; 17.0%). Significant declining trends were seen for both ADCs (APC = −15.6%/year) and all NADCs (APC = −15.8%/year), a comparable pattern to that found for the general female population. Trends in cancers among people with AIDS in São Paulo showed similar patterns to those found in developed countries. Although ADCs have significantly decreased, probably due to the introduction of HAART, NADCs in men have shown an opposite upward trend.