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 responses. 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 DNA. 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 mechanism. 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 CRL4(DCAF1) 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 infection. 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 sensors. 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.