Since there is currently no vaccine that prevents HIV infection, pre-exposure prophylaxis (PrEP) with antiretrovirals (ARVs) is an important tool in combating the HIV pandemic1,2. Long-acting ARVs promise to build on the success of current PrEP strategies, which must be taken daily, by reducing the frequency of administration3. GS-CA1 is a small-molecule HIV capsid inhibitor with picomolar antiviral potency against a broad array of HIV strains, including variants resistant to existing ARVs, and has shown long-acting therapeutic potential in a mouse model of HIV infection4. Here we show that a single subcutaneous administration of GS-CA1 provides long-term protection against repeated rectal SHIV challenges in rhesus macaques. Whereas all control animals became infected after 15 weekly challenges, a single 300 mg/kg dose of GS-CA1 provided 97% per-exposure risk reduction for infection for 24 weeks. Pharmacokinetic analysis showed a correlation between GS-CA1 plasma concentration and protection from SHIV challenges, with GS-CA1 levels >2-fold the rhesus plasma protein-adjusted 95% effective concentration conferring 100% protection in this model. These proof-of-concept data support the development of capsid inhibitors as a novel long-acting PrEP strategy in humans.