Epstein-Barr virus (EBV) and Kaposi's sarcoma herpesvirus (KSHV), formally designated human herpesvirus 4 (HHV-4) and 8 (HHV-8), respectively, are viruses that can cause a variety of cancers in humans. EBV is found in non-Hodgkin and Hodgkin lymphomas, as well as in lymphoproliferative disorders, which occur more commonly but not exclusively in individuals with immunodeficiency. EBV also causes nonlymphoid malignancies such as nasopharyngeal carcinoma. KSHV causes primary effusion lymphomas, multicentric Castleman's disease, and Kaposi's sarcoma. The frequency of lymphoid malignancies related to infection by one of these two herpesviruses is greatly increased in individuals with immunodeficiency, whether primary or acquired, for example, as a consequence of HIV infection and AIDS or in the case of therapeutic immunosuppression for organ transplantation. Our current understanding indicates that EBV and KSHV contribute to lymphomagenesis by affecting genomic stability and by subverting the cellular molecular signaling machinery and metabolism to avoid immune surveillance and enhance tumor cell growth and survival. Understanding the viral associations in specific lymphoproliferative disorders and the molecular mechanisms of viral oncogenesis will lead to better prevention, diagnosis, and treatment strategies for these diseases.