Sperm chemoattraction, where sperm locate unfertilized eggs by following a concentration gradient of egg-derived chemoattractants, has been widely documented across numerous taxa. While marine invertebrates are favoured models for understanding the underlying mechanisms of sperm chemoattraction, the evolutionary forces underpinning the process remain enigmatic. Here, we show that in mussels (Mytilus galloprovincialis), chemically moderated gamete preferences promote assortative fertilizations between genetically compatible gametes. When offered the choice of egg clutches from two females, sperm exhibited consistent but differential 'preferences' for chemical cues secreted from conspecific eggs. Critically, our data reveal that the preferences shown by sperm during the egg-choice trials are highly predictive of early embryonic viability when eggs and sperm from the same individuals are mixed during standard (no-choice) fertilization assays. Moreover, we demonstrate that by experimentally separating chemoattractants from eggs, sperm swimming behaviour is differentially regulated by eggderived chemoattractants, and that these changes in sperm behaviour are highly consistent with observed patterns of gamete preferences, fertilization and larval survival. Together, this integrated series of experiments reveals that the behaviour of sperm is fine-tuned to respond differentially to the chemical signals emitted from different conspecific eggs, and that these choices have measurable fitness benefits.