Attachment theory provides a framework for understanding individual differences in chronic interpersonal stress and may offer insight into the associations between interpersonal relationships and health. Attachment anxiety, a type of relationship insecurity characterized by worry about rejection and abandonment, is a chronic interpersonal stressor. Stress impacts cellular immunity, including herpesvirus reactivation. In this study, we investigated whether attachment anxiety was related to the expression of a latent herpesvirus, Epstein–Barr virus (EBV), during a stressful period when individuals were being tested for breast or colon cancer because of suspicious symptoms or a suspicious initial test, and then during a lower stress period approximately 1 year later. Participants ( n = 183) completed questionnaires and provided blood to assess EBV viral capsid antigen (VCA) IgG antibody titers. Compared with those who had lower attachment anxiety, individuals who had higher levels of attachment anxiety had higher EBV VCA IgG antibody titers, reflecting poorer cellular immune system control of the latent virus. General anxiety did not explain the association between attachment anxiety and EBV VCA IgG antibody titers. The association between attachment anxiety and EBV VCA IgG antibody titers was not more pronounced during the more stressful period compared with the less stressful period. This study adds to our growing understanding of how interpersonal relationships and chronic interpersonal stress influence immune function and health.