In species with high male mating effort, there is a trade-off between mating effort spent in a current mating and resources left for future matings. Males are therefore expected to allocate resources prudently across successive matings. Attractive males that will have a high mating success might therefore be forced to decrease mating investment in comparison to less attractive males. Furthermore, if there is genetic variation in attractiveness, one might expect to find a negative genetic correlation between attractiveness and mating investment. Here this genetic prediction is tested using the scorpionfly Panorpa cognata (Insecta: Mecoptera). In this species males offer costly salivary secretions as nuptial gifts to females. By producing large secretions males increase copulation duration and sperm transfer, thus gaining an advantage in sperm competition. I used a full-sib breeding design and found that both attractiveness and mating investment showed considerable heritability. Most importantly, there was a significant negative genetic correlation between attractiveness and mating investment: in families with attractive individuals, males produced smaller salivary secretions than in families with less attractive males. The results thus demonstrate an important evolutionary trade-off between mating success and sperm competition success.