There is evidence that certain infections and autoimmunity predispose to the development of non-Hodgkin lymphomas (NHLs). A previous study reported that hospitalization for infections in infancy led to an increased risk of NHL. By using population-based registries in Sweden, we compared the rate of hospitalization for infections in infancy between lymphoma cases and matched controls for patients born since 1964. A history of infection was associated with a significantly increased risk of aggressive B-cell lymphomas (odds ratio 2.1, 95% confidence interval 1.11-4.04, P = .02). The specific infections involved were respiratory and intestinal. No effects were observed among cases of Hodgkin lymphoma. This association could result from the infection, its treatment, or could be a surrogate marker for underlying immune defects. Further studies are needed to determine whether this association is present among NHL occurring in older adults and if improved survival of patients with immune defects has contributed to the secular increases in incidence of NHLs.