HIV remains a major cause of morbidity and mortality for people living in many low-income countries. With an HIV prevalence of 12.4% among people aged over 15 years, Mozambique was ranked in 2019 as one of eight countries with the highest HIV rates in the world. We analyzed routinely collected data from electronical medical records in HIV-infected patients aged 15 years or older and enrolled at Carmelo Hospital of Chokwe in Chokwe from 2002 to 2019. Attrition was defined as individuals who were either reported dead or lost to follow-up (LTFU) (≥ 90 days since the last clinic visit with missed medical pick-up after 3 days of failed calls). Kaplan–Meier survival curves and Cox regression analyses were used to model the incidence and predictors of time to attrition. From January 2002 to December 2019, 16,321 patients were enrolled on antiretroviral therapy (ART): 59.2% were women, and 37.9% were aged 25–34 years old. At the time of the analysis, 7279 (44.6%) were active and on ART. Overall, the 16,321 adults on ART contributed a total of 72,987 person-years of observation. The overall attrition rate was 9.46 per 100 person-years. Cox regression showed a higher risk of attrition in those following an inpatient regimen (hazard ratio [HR] 3.18, 95% confidence interval [CI] 2.89–3.50; p < 0.001), having CD4 counts under 50 cells/µL (HR 1.91, 95% CI 1.63–2.24, p < 0.001), receiving anti-TB treatment within 90 days of ART initiation (HR 6.53, 95% CI 5.72–7.45; p < 0.001), classified as WHO clinical stage III (HR 3.75, 95% CI 3.21–4.37; p < 0.001), and having Kaposi’s sarcoma (HR 1.99, 95% CI 1.65–2.39, p < 0.001). Kaplan–Meier analysis showed that patients with CD4 counts of less than 50 cells/µL on ART initiation had a 40% lower chance of survival at 18 years. Low CD4 cell counts, ART initiation as an inpatient, WHO clinical stage III, and anti-tuberculosis treatment within 90 days of ART initiation were strongly associated with attrition. Strengthening HIV testing and ART treatment, improving the diagnosis of tuberculosis before ART initiation, and guaranteed psychosocial support systems are the best tools to reduce patient attrition after starting ART.