HIV-1 is unable to replicate efficiently in dendritic cells, the antigen-presenting tissue cells that function in both innate and adaptive immunity. Other primate lentiviruses, including HIV-2 and some simian immunodeficiency viruses, express a protein called Vpx that is able to overcome the block to replication. Two groups now report the identification of the restriction factor in dendritic cells and macrophages that is overcome by Vpx. Vpx is found to induce degradation of the protein SAMHD1. Mutations in SAMHD1 cause Aicardi–Goutières syndrome, a disorder characterized by inappropriate activation of the immune system. Knockdown of SAMHD1 increases HIV-1 replication in dendritic cells, which could be important for generating appropriate immune responses to the virus. Macrophages and dendritic cells have key roles in viral infections, providing virus reservoirs that frequently resist antiviral therapies and linking innate virus detection to antiviral adaptive immune responses1,2. Human immunodeficiency virus 1 (HIV-1) fails to transduce dendritic cells and has a reduced ability to transduce macrophages, due to an as yet uncharacterized mechanism that inhibits infection by interfering with efficient synthesis of viral complementary DNA3,4. In contrast, HIV-2 and related simian immunodeficiency viruses (SIVsm/mac) transduce myeloid cells efficiently owing to their virion-associated Vpx accessory proteins, which counteract the restrictive mechanism5,6. Here we show that the inhibition of HIV-1 infection in macrophages involves the cellular SAM domain HD domain-containing protein 1 (SAMHD1). Vpx relieves the inhibition of lentivirus infection in macrophages by loading SAMHD1 onto the CRL4DCAF1 E3 ubiquitin ligase, leading to highly efficient proteasome-dependent degradation of the protein. Mutations in SAMHD1 cause Aicardi–Goutières syndrome, a disease that produces a phenotype that mimics the effects of a congenital viral infection7,8. Failure to dispose of endogenous nucleic acid debris in Aicardi–Goutières syndrome results in inappropriate triggering of innate immune responses via cytosolic nucleic acids sensors9,10. Thus, our findings show that macrophages are defended from HIV-1 infection by a mechanism that prevents an unwanted interferon response triggered by self nucleic acids, and uncover an intricate relationship between innate immune mechanisms that control response to self and to retroviral pathogens.