Abstract People living with HIV (PLHIV) are exposed to chronic immune dysregulation, even when virus replication is suppressed by antiretroviral therapy (ART). Given the emerging role of the gut microbiome in immunity, we hypothesized that the gut microbiome may be related to the cytokine production capacity of PLHIV. To test this hypothesis, we collected metagenomic data from 143 ART-treated PLHIV and assessed the ex vivo production capacity of eight different cytokines (IL-1β, IL-6, IL-1Ra, IL-10, IL17, IL22, TNF and IFN-γ) in response to different stimuli. We also characterized CD4 + T cell–counts, HIV reservoir and other clinical parameters. Compared to 190 age- and sex-matched controls and a second independent control cohort, PLHIV showed microbial dysbiosis that was correlated with viral reservoir levels, cytokine production capacity and sexual behavior. Notably, we identified two genetically different P. copri strains that were enriched in either PLHIV or healthy controls. The control-enriched strain was negatively associated with IL-10, IL-6 and TNF production, independent of age, sex and sexual behavior, and positively associated with CD4 + T cell–level, whereas the PLHIV-enriched strain showed no associations. Our findings suggest that modulating the gut microbiome may be a strategy to modulate immune response in PLHIV. Novel Points We identified compositional and functional changes in the gut microbiome of PLHIV that were strongly related to sexual behavior. HIV-associated bacterial changes are negatively associated with HIV reservoir. The relative abundance of Firmicutes bacterium CAG 95 and Prevotella sp CAG 5226 both show a negative association with CD4 + T cell–associated HIV-1 DNA. Prevotella copri and Bacteroides vulgatus show association with PBMC production capacity of IL-1β and IL-10 that is independent of age, sex, BMI and sexual behavior. We observed two genetically different P. copri strains that are enriched in PLHIV and healthy individuals, respectively. The control-related P. copri strain specifically shows a negative association with IL-10, IL-6 and TNF production and a positive association with CD4 + T cell–level. This suggests it plays a potential protective role in chronic inflammation, which may be related to enrichment of a specific epitope peptide.