BACKGROUND Bone demineralization, which leads to osteoporosis and increased fracture risk, is a common metabolic disorder in HIV-infected individuals. In this study, we aimed to assess the change in bone quality using quantitative ultrasound (QUS) over 96 weeks of follow-up after initiation of second-line treatment, and to identify factors associated with change in bone quality. METHODS AND FINDINGS In a randomized trial (ANRS 12169), TDF and PI-naïve participants failing standard first-line treatment, from Burkina Faso, Cameroon, and Senegal were randomized to receive either TDF/FTC/LPVr, ABC/ddI/LPVr or TDF/FTC/DRVr. Their bone quality was assessed using calcaneal QUS at baseline and every 24 weeks until week 96. Stiffness index (SI) was used to measure bone quality. Out of 228 participants, 168 (74%) were women. At baseline, median age was 37 years (IQR: 33-46 years) and median T-CD4 count was 199 cells/μl (IQR: 113-319 cells/μl). The median duration of first-line antiretroviral treatment (ART) was 52 months (IQR: 36-72 months) and the median baseline SI was 101 (IQR: 87-116). In multivariable analysis, factors associated with baseline SI were sex (β = -10.8 [-18.1,-3.5] for women), age (β = -8.7 [-12.4,-5.1] per 10 years), body mass index (BMI) (β = +0.8 [0.1,1.5] per unit of BMI), and study site (β = +12.8 [6.5,19.1] for Cameroon). After 96 weeks of second-line therapy, a reduction of 7.1% in mean SI was observed, as compared with baseline. Factors associated with SI during the follow-up were similar to those found at baseline. Exposure to TDF was not associated with a greater loss of bone quality over time. CONCLUSION Bone quality decreased after second-line ART initiation in African patients independently of TDF exposure. Factors associated with bone quality include age, sex, baseline BMI, study site, and duration of follow-up.