After infection of B cells, Epstein-Barr virus (EBV) engages host pathways that mediate cell proliferation and transformation, contributing to the propensity of the virus to drive immune dysregulation and lymphomagenesis. We found that the EBV protein EBNA2 initiates nicotinamide adenine dinucleotide (NAD) de novo biosynthesis by driving expression of the metabolic enzyme indoleamine 2,3-dioxygenase 1 (IDO1) in infected B cells. Virus-enforced NAD production sustained mitochondrial complex I activity, to match adenosine triphosphate (ATP) production with bioenergetic requirements of proliferation and transformation. In transplant patients, IDO1 expression in EBV-infected B cells, and a serum signature of increased IDO1 activity, preceded development of lymphoma. In humanized mice infected with EBV, IDO1 inhibition reduced both viremia and lymphomagenesis. Virus-orchestrated NAD biosynthesis is therefore a druggable metabolic vulnerability of EBV-driven B cell transformation, opening therapeutic possibilities for EBV-related diseases.