SAMHD1 possesses multiple functions, but whether cellular factors regulate SAMHD1 expression or its function remains not well characterized. Here, by investigating why cultured RD and HEK293T cells show different sensitivity to enterovirus 71 (EV71) infection, we demonstrate that SAMHD1 is a restriction factor for EV71. Importantly, we identify TRIM21, an E3 ubiquitin ligase, as a key regulator of SAMHD1, which specifically interacts and degrades SAMHD1 through the proteasomal pathway. However, TRIM21 has no effect on EV71 replication itself. Moreover, we prove that interferon production stimulated by EV71 infection induces increased TRIM21 and SAMHD1 expression, whereas increasing TRIM21 overrides SAMHD1 inhibition of EV71 in cells and in a neonatal mouse model. TRIM21‐mediated degradation of SAMHD1 also affects SAMHD1‐dependent restriction of HIV‐1 and the regulation of interferon production. We further identify the functional domains in TRIM21 required for SAMHD1 binding and the ubiquitination site K622 in SAMHD1 and show that phosphorylation of SAMHD1 at T592 also blocks EV71 restriction. Our findings illuminate how EV71 overcomes SAMHD1 inhibition via the upregulation of TRIM21.