Life expectancy among people with HIV (PWH) is increasing, making chronic conditions-including cancer-increasingly relevant. Among PWH, cancer burden has shifted from AIDS-defining cancers (ADCs) toward non-AIDS-defining cancers (NADCs). We described incidence of cancer in a claims-based cohort of Medicaid beneficiaries. We included 43,426,043 Medicaid beneficiaries (180,058 with HIV) from 14 US states, aged 18-64, with >6 months of enrollment (with no dual enrollment in another insurance) and no evidence of a previous cancer. We estimated cumulative incidence of site-specific cancers, NADCs, and ADCs, by baseline HIV status, using age as the time scale and accounting for death as a competing risk. We compared cumulative incidence across HIV status to estimate risk differences. We examined cancer incidence overall and by sex, race/ethnicity, and calendar period. PWH had a higher incidence of ADCs, infection-related NADCs, and death. For NADCs such as breast, prostate, and colon cancer, incidence was similar or higher among PWH below age 50, but higher among those without HIV by age 65. Incidence of lung and head and neck cancer was always higher for female beneficiaries with HIV, whereas the curves crossed for male beneficiaries. We saw only small differences in incidence trends by race/ethnicity. Our findings suggest an increased risk of certain NADCs at younger ages among PWH, even when compared against other Medicaid beneficiaries, and highlight the importance of monitoring PWH for ADCs and NADCs. Future work should explore possible mechanisms explaining the differences in incidence for specific cancer types.