Monocyte-derived macrophages (MDM) can polarize into different subsets depending on the environment and the activation signal to which they are submitted. Differentiation into macrophages allows HIV-1 strains to infect cells of the monocytic lineage. In this study, we show that culture of monocytes with a combination of IL-12 and IL-18 led to macrophage differentiation that was resistant to HIV-1 infection. In contrast, M-CSF-derived MDM were readily infected by HIV-1. When monocytes were differentiated in the presence of M-CSF and then further treated with IL-12/IL-18, cells became resistant to infection. The restriction on HIV-1 replication was not dependent on virus entry or coreceptor expression, as vesicular stomatitis virus-pseudotyped HIV-1 replication was also blocked by IL-12/IL-18. The HIV-1 restriction factor sterile α motif and HD domain-containing protein-1 (SAMHD1) was significantly overexpressed in IL-12/IL-18 MDM compared with M-CSF MDM, and degradation of SAMHD1 by RNA interference or viral-like particles carrying the lentiviral protein Vpx restored HIV-1 infectivity of IL-12/IL-18 MDM. SAMHD1 overexpression induced by IL-12/IL-18 was not dependent on IFN-γ. Thus, we conclude that IL-12 and IL-18 may contribute to the response against HIV-1 infection through the induction of restriction factors such as SAMHD1.