Sexual selection favours traits that confer advantages in the competition for mates. In many cases, such traits are costly to produce and maintain, because the costs help to enforce the honesty of these signals and cues1. Some evolutionary models predict that sexual selection also produces costs at the population level, which could limit the ability of populations to adapt to changing conditions and thus increase the risk of extinction2,3,4. Other models, however, suggest that sexual selection should increase rates of adaptation and enhance the removal of deleterious mutations, thus protecting populations against extinction3, 5, 6. Resolving the conflict between these models is not only important for explaining the history of biodiversity, but also relevant to understanding the mechanisms of the current biodiversity crisis. Previous attempts to test the conflicting predictions produced by these models have been limited to extant species and have thus relied on indirect proxies for species extinction. Here we use the informative fossil record of cytheroid ostracods—small, bivalved crustaceans with sexually dimorphic carapaces—to test how sexual selection relates to actual species extinction. We show that species with more pronounced sexual dimorphism, indicating the highest levels of male investment in reproduction, had estimated extinction rates that were ten times higher than those of the species with the lowest investment. These results indicate that sexual selection can be a substantial risk factor for extinction.