SAMHD1 regulates cellular 2'-deoxynucleoside-5'-triphosphate (dNTP) homeostasis by catalysing the hydrolysis of dNTPs into 2'-deoxynucleosides and triphosphate. In CD4+ myeloid lineage and resting T-cells, SAMHD1 blocks HIV-1 and other viral infections by depletion of the dNTP pool to a level that cannot support replication. SAMHD1 mutations are associated with the autoimmune disease Aicardi-Goutières syndrome and hypermutated cancers. Furthermore, SAMHD1 sensitises cancer cells to nucleoside-analogue anti-cancer therapies and is linked with DNA repair and suppression of the interferon response to cytosolic nucleic acids. Nevertheless, despite its requirement in these processes, the fundamental mechanism of SAMHD1-catalysed dNTP hydrolysis remained unknown. Here, we present structural and enzymological data showing that SAMHD1 utilises an active site, bi-metallic iron-magnesium centre that positions a hydroxide nucleophile in-line with the Pα-O5' bond to catalyse phosphoester bond hydrolysis. This precise molecular mechanism for SAMHD1 catalysis, reveals how SAMHD1 down-regulates cellular dNTP and modulates the efficacy of nucleoside-based anti-cancer and anti-viral therapies.