To accomplish the remarkable task of lifelong infection, the Epstein-Barr virus (EBV) switches between four viral genome latency and lytic programmes to navigate the B-cell compartment and evade immune responses. The transforming programme, consisting of highly immunogenic EBV nuclear antigen (EBNA) and latent membrane proteins (LMPs), is expressed in newly infected B lymphocytes and in post-transplant lymphomas. On memory cell differentiation and in most EBV-associated Burkitt's lymphomas, all but one viral antigen are repressed for immunoevasion. To gain insights into the epigenetic mechanisms that restrict immunogenic oncoprotein expression, a genome-scale CRISPR-Cas9 screen was performed in EBV and Burkitt's lymphoma cells. Here, we show that the ubiquitin ligase ubiquitin-like PHD and RING finger domain-containing protein 1 (UHRF1) and its DNA methyltransferase partner DNA methyltransferase I (DNMT1) are critical for the restriction of EBNA and LMP expression. All UHRF1 reader and writer domains were necessary for silencing and DNMT3B was identified as an upstream viral genome CpG methylation initiator. Polycomb repressive complex I exerted a further layer of control over LMP expression, suggesting a second mechanism for latency programme switching. UHRF1, DNMT1 and DNMT3B are upregulated in germinal centre B cells, the Burkitt's lymphoma cell of origin, providing a molecular link between B-cell state and the EBV latency programme. These results suggest rational therapeutic targets to manipulate EBV oncoprotein expression.