Selection on intrinsic lifespan depends on both external factors affecting mortality and inherent tradeoffs in resource allocation between viability traits and other fitness-related traits. Longevity is therefore likely to vary between species in a sex-specific manner due to interspecific and intersexual differences in behavioural ecology. Here I focus on the bovid family to test two central hypotheses on longevity selection using the comparative method: firstly, that a reduction of extrinsic mortality in social species strengthens selection on intrinsic lifespan, and secondly, that mortality costs associated with intense sexual selection lead to shorter intrinsic lifespan. The results show that longevity (i) increases with sociality in both sexes and (ii) decreases with male-biased sexual size-dimorphism, but in males only. These discoveries suggest that sociality, a key ungulate strategy to reduce predation-related mortality, selects for inherently longer-lived organisms, and that strong sexual selection, which is known to compromise survival rates in the wild, can constrain also intrinsic lifespan. The contrasting results for males and females indicate that selection on longevity in the two sexes is partly uncoupled.