Effects of diet on longevity are complex because acquired resources are shared among growth, reproduction and somatic maintenance. We simplify these axes by examining how dietary restriction and competitive contexts affect longevity using semelparous males of the Australian redback spider (Latrodectus hasselti). Plastic development of L. hasselti males results in trade-offs of body condition against faster development if females are present, facilitating scramble competition. In the absence of females, males develop slowly as high body condition adults, and are better equipped for mate searching. Here we focus on effects of diet and competitive context on body condition and longevity. Although male survival depended on body condition and exercise, contrary to studies in a wide range of taxa, dietary restriction did not increase longevity. However, there was an interactive effect of diet and competitive context on lifespan, because high-diet males reared in the absence of females lived longer than males reared in the presence of females. Thus males near females pay a survival cost of developing rapidly. This shows that life-history trade-offs affected by competitive context can impose longevity costs independent of the direct energy expenditure of searching, courtship, competition or reproduction.