Individuals infected with human immunodeficiency virus (HIV) are commonly treated with combination antiretroviral therapies, which reduce viral replication. However, HIV can also infect cells in the brain, including microglia, perivascular macrophages and astrocytes, allowing the virus to replicate despite treatment. In addition, infection of brain cells can lead to neuroinflammation and neurocognitive disorders, which are further worsened by drug abuse. Unfortunately, current combination antiretroviral therapies cannot cross the blood–brain barrier and, thus, cannot reach HIV in the brain. Nagesh Kolishetti, Shanta Dhar and colleagues now optimized biodegradable polymer nanoparticles to deliver antiviral therapies together with antioxidant and anti-inflammatory neuroprotectants across the blood–brain barrier. The drug release profile of these brain-targeted polymeric nanoparticles can be finely tuned, and their accumulation in the brain increases the bioavailability of the therapeutics. In HIV-infected and methamphetamine-exposed mice, treatment with the nanoparticles could reduce viral load in the brain and mitigate drug-induced and HIV-induced oxidative stress and inflammation in astrocytes and microglia, offering a promising new strategy for the treatment of individuals infected with HIV.