Identifying traits that affect rates of speciation and extinction and, hence, explain differences in species diversity among clades is a major goal of evolutionary biology. Detecting such traits is especially difficult when they undergo frequent transitions between states. Self-incompatibility, the ability of hermaphrodites to enforce outcrossing, is frequently lost in flowering plants, enabling self-fertilization. We show, however, that in the nightshade plant family (Solanaceae), species with functional self-incompatibility diversify at a significantly higher rate than those without it. The apparent short-term advantages of potentially self-fertilizing individuals are therefore offset by strong species selection, which favors obligate outcrossing.