Patients hospitalized with advanced HIV have a high mortality risk. We assessed viremia and drug resistance among differentiated care services and explored whether expediting the switching of failing treatments may be justified. Hospitals in the Democratic Republic of (DRC) Congo (HIV hospital) and Kenya (general hospital including HIV care). Viral load (VL) testing and drug resistance (DR) genotyping were conducted for HIV inpatients ≥15 years, on first-line antiretroviral therapy (ART) for ≥6 months, and CD4 ≤350 cells/µL. Dual-class DR was defined as low-, intermediate-, or high-level DR to at least 1 nucleoside reverse transcriptase inhibitor and 1 non-nucleoside reverse transcriptase inhibitor. ART regimens were considered ineffective if dual-class DR was detected at viral failure (VL ≥1000 copies/mL). Among 305 inpatients, 36.7% (Kenya) and 71.2% (DRC) had VL ≥1000 copies/mL, of which 72.9% and 73.7% had dual-class DR. Among viral failures on tenofovir disoproxil fumarate (TDF)-based regimens, 56.1% had TDF-DR and 29.8% zidovudine (AZT)-DR; on AZT regimens, 71.4% had AZT-DR and 61.9% TDF-DR, respectively. Treatment interruptions (≥48 hours during past 6 months) were reported by 41.7% (Kenya) and 56.7% (DRC). Approximately 56.2% (Kenya) and 47.4% (DRC) on TDF regimens had tenofovir diphosphate concentrations <1250 fmol/punch (suboptimal adherence). Among viral failures with CD4 <100 cells/µL, 76.0% (Kenya) and 84.6% (DRC) were on ineffective regimens. Many hospitalized, ART-experienced patients with advanced HIV were on an ineffective first-line regimen. Addressing ART failure promptly should be integrated into advanced disease care packages for this group. Switching to effective second-line medications should be considered after a single high VL on non-nucleoside reverse transcriptase inhibitor-based first-line if CD4 ≤350 cells/µL or, when VL is unavailable, among patients with CD4 ≤100 cells/µL.