Background Allogeneic haematopoietic stem-cell transplantation (allo-HSCT) markedly reduces HIV reservoirs, but the mechanisms by which this occurs are only partly understood. In this study, we aimed to describe the dynamics of virological and immunological markers of HIV persistence after allo-HSCT. Methods In this prospective observational cohort study, we analysed the viral reservoir and serological dynamics in IciStem cohort participants with HIV who had undergone allo-HSCT and were receiving antiretroviral therapy, ten of whom had received cells from donors with the CCR5Δ32 mutation. Participants from Belgium, Canada, Germany, Italy, the Netherlands, Spain, Switzerland, and the UK were included in the cohort both prospectively and retrospectively between June 1, 2014 and April 30, 2019. In the first 6 months after allo-HSCT, participants had monthly assessments, with annual assessments thereafter, with the protocol tailored to accommodate for the individual health status of each participant. HIV reservoirs were measured in blood and tissues and HIV-specific antibodies were measured in plasma. We used the Wilcoxon signed-rank test to compare data collected before and after allo-HSCT in participants for whom longitudinal data were available. When the paired test was not possible, we used the Mann-Whitney U test. We developed a mathematical model to study the factors influencing HIV reservoir reduction in people with HIV after allo-HSCT. Findings We included 30 people with HIV with haematological malignancies who received a transplant between Sept 1, 2009 and April 30, 2019 and were enrolled within the IciStem cohort and included in this analysis. HIV reservoirs in peripheral blood were reduced immediately after full donor chimerism was achieved, generally accompanied by undetectable HIV-DNA in bone marrow, ileum, lymph nodes, and cerebrospinal fluid, regardless of donor CCR5 genotype. HIV-specific antibody levels and functionality values declined more slowly than direct HIV reservoir values, decaying significantly only months after full donor chimerism. Mathematical modelling suggests that allogeneic immunity mediated by donor cells is the main viral reservoir depletion mechanism after massive reservoir reduction during conditioning chemotherapy before allo-HSCT (half-life of latently infected replication-competent cells decreased from 44 months to 1·5 months). Interpretation Our work provides, for the first time, data on the effects of allo-HSCT in the context of HIV infection. Additionally, we raise the question of which marker can serve as the last reporter of the residual viraemia, postulating that the absence of T-cell immune responses might be a more reliable marker than antibody decline after allo-HSCT. Funding amfAR (American Foundation for AIDS Research; ARCHE Program), National Institutes of Health, National Institute of Allergy and Infectious Diseases, and Dutch Aidsfonds.