Acyclovir or similar agents with activity against Epstein-Barr virus (EBV) theoretically may prevent non-Hodgkin's lymphoma (NHL) in AIDS. A case-control study of 29 patients with AIDS-related NHL and 58 matched control subjects assessed the frequency with which daily acyclovir (>/=800 mg/d) or similar agents were used for > or =1 year. In a historical cohort of 304 patients with AIDS for > or =2 years, the prevalence of NHL was assessed among 3 groups of patients: those who received long-term treatment with high-dose acyclovir (or similar agents) or low-dose or intermittent acyclovir; those treated with ganciclovir/foscarnet for <1 year; and those who had not previously been treated with acyclovir, ganciclovir, or foscarnet. In the case-control study, 22 patients (72.4%) with NHL never received acyclovir or similar drugs versus 19 control subjects (32.8%; P=. 002); 2 patients (6.9%) with NHL received acyclovir (> or =800 mg/d) for > or =1 year versus 27 (46.6%) of control subjects (P=.0001). In the cohort study, 6 (6.8%) of 88 patients who received acyclovir (> or =800 mg/d) for > or =1 year developed NHL versus 15 (15.5%) of 97 patients who received intermittent or lower-dose acyclovir and 30 (25.2%) of 119 patients who never received these agents (P=.002). Long-term administration (>1 year) of high-dose acyclovir or similar agents with anti-EBV activity may prevent NHL in patients with AIDS. A prospective, randomized study is warranted to confirm these results.