Sexual traits may be selected during multiple consecutive episodes of selection, occurring before, during, or after copulation. The overall strength and form of selection acting on traits may thus be determined by how selection (co-)varies along different episodes. However, it is challenging to measure pre- and postcopulatory phenotypic traits alongside variation in fitness components at each different episode. Here, we used a transgenic line of the transparent flatworm Macrostomum lignano expressing green fluorescent protein (GFP) in all cell types, including sperm cells, enabling in vivo sperm tracking. We assessed the mating success, sperm-transfer efficiency, and sperm fertilizing efficiency of GFP(+) focal worms in which we measured 13 morphological traits. We found linear selection on sperm production rate arising from pre- and postcopulatory components and on copulatory organ shape arising from sperm fertilizing efficiency. We further found nonlinear (mostly concave) selection on combinations of copulatory organ and sperm morphology traits arising mostly from sperm-transfer efficiency and sperm fertilizing efficiency. Our study provides a fine-scale quantification of sexual selection, showing that both the form and strength of selection can change across fitness components. Quantifying how sexual selection builds up along episodes of selection allows us to better understand the evolution of sexually selected traits.