Among the extraordinary adaptations driven by sperm competition is the cooperative behaviour of spermatozoa. By forming cooperative groups, sperm can increase their swimming velocity and thereby gain an advantage in intermale sperm competition. Accordingly, selection should favour cooperation of the most closely related sperm to maximize fitness. Here we show that sperm of deer mice (genus Peromyscus) form motile aggregations, then we use this system to test predictions of sperm cooperation. We find that sperm aggregate more often with conspecific than heterospecific sperm, suggesting that individual sperm can discriminate on the basis of genetic relatedness. Next, we provide evidence that the cooperative behaviour of closely related sperm is driven by sperm competition. In a monogamous species lacking sperm competition, Peromyscus polionotus, sperm indiscriminately group with unrelated conspecific sperm. In contrast, in the highly promiscuous deer mouse, Peromyscus maniculatus, sperm are significantly more likely to aggregate with those obtained from the same male than with sperm from an unrelated conspecific donor. Even when we test sperm from sibling males, we continue to see preferential aggregations of related sperm in P. maniculatus. These results suggest that sperm from promiscuous deer mice discriminate among relatives and thereby cooperate with the most closely related sperm, an adaptation likely to have been driven by sperm competition.