Sexual selection often favours investment in expensive sexual traits that help individuals compete for mates. In a rapidly changing environment, however, allocation of resources to traits related to reproduction at the expense of those related to survival may elevate extinction risk. Empirical testing of this hypothesis in the fossil record, where extinction can be directly documented, is largely lacking. The rich fossil record of cytheroid ostracods offers a unique study system in this context: the male shell is systematically more elongate than that of females, and thus the sexes can be distinguished, even in fossils. Using mixture models to identify sex clusters from size and shape variables derived from the digitized valve outlines of adult ostracods, we estimated sexual dimorphism in ostracod species before and after the Cretaceous/Palaeogene mass extinction in the United States Coastal Plain. Across this boundary, we document a substantial shift in sexual dimorphism, driven largely by a pronounced decline in the taxa with dimorphism indicating both very high and very low male investment. The shift away from high male investment, which arises largely from evolutionary changes within genera that persist through the extinction, parallels extinction selectivity previously documented during the Late Cretaceous under a background extinction regime. Our results suggest that sexual selection and the allocation of resources towards survival versus reproduction may be an important factor for species extinction during both background and mass extinctions.