Length of the sperm flagellum and of the female's primary sperm-storage organ, the seminal receptacle (SR), exhibit a pattern of rapid correlated evolution in Drosophila and other lineages. Experimental evolution studies with Drosophila melanogaster indicate that these traits have coevolved through sexual selection, with length of the SR representing the proximal basis of female sire discrimination, biasing paternity according to sperm length. Here, we examine the impact of experimentally varying the developmental environment, including larval density and larval and adult nutrition, on sperm length, SR length and on the pattern of sperm precedence. Expression of SR length was far more sensitive to variation among developmental environments than was sperm length. Nevertheless, there was striking co-variation in sperm and SR length. The developmental environment of both females and second males, but not first males, significantly contributed to variation in male competitive fertilization success.