People living with HIV (PLWH) have expressed concern about the life-long burden and stigma associated with taking pills daily and can experience medication fatigue that might lead to suboptimal treatment adherence and the emergence of drug-resistant viral variants, thereby limiting future treatment options1-3. As such, there is strong interest in long-acting antiretroviral (ARV) agents that can be administered less frequently4. Herein, we report GS-CA1, a new archetypal small-molecule HIV capsid inhibitor with exceptional potency against HIV-2 and all major HIV-1 types, including viral variants resistant to the ARVs currently in clinical use. Mechanism-of-action studies indicate that GS-CA1 binds directly to the HIV-1 capsid and interferes with capsid-mediated nuclear import of viral DNA, HIV particle production and ordered capsid assembly. GS-CA1 selects in vitro for unfit GS-CA1-resistant capsid variants that remain fully susceptible to other classes of ARVs. Its high metabolic stability and low solubility enabled sustained drug release in mice following a single subcutaneous dosing. GS-CA1 showed high antiviral efficacy as a long-acting injectable monotherapy in a humanized mouse model of HIV-1 infection, outperforming long-acting rilpivirine. Collectively, these results demonstrate the potential of ultrapotent capsid inhibitors as new long-acting agents for the treatment of HIV-1 infection.