Chronic hepatitis B virus infection is a leading cause of cirrhosis and liver cancer. Hepatitis B virus encodes the regulatory HBx protein whose primary role is to promote transcription of the viral genome, which persists as an extrachromosomal DNA circle in infected cells. HBx accomplishes this task by an unusual mechanism, enhancing transcription only from extrachromosomal DNA templates. Here we show that HBx achieves this by hijacking the cellular DDB1-containing E3 ubiquitin ligase to target the 'structural maintenance of chromosomes' (Smc) complex Smc5/6 for degradation. Blocking this event inhibits the stimulatory effect of HBx both on extrachromosomal reporter genes and on hepatitis B virus transcription. Conversely, silencing the Smc5/6 complex enhances extrachromosomal reporter gene transcription in the absence of HBx, restores replication of an HBx-deficient hepatitis B virus, and rescues wild-type hepatitis B virus in a DDB1-knockdown background. The Smc5/6 complex associates with extrachromosomal reporters and the hepatitis B virus genome, suggesting a direct mechanism of transcriptional inhibition. These results uncover a novel role for the Smc5/6 complex as a restriction factor selectively blocking extrachromosomal DNA transcription. By destroying this complex, HBx relieves the inhibition to allow productive hepatitis B virus gene expression.