Sexual selection is thought to favor the evolution of secondary sexual traits in males that contribute to mating success. In species where females mate with more than one male, sexual selection also continues after copulation in the form of sperm competition and cryptic female choice. Theory suggests that sperm competition should favor traits such as testes size and sperm production that increase a male's competitive fertilization success. Studies of experimental evolution offer a powerful approach for assessing evolutionary responses to variation in sexual selection pressures. Here we removed sexual selection by enforcing monogamy on replicate lines of a naturally polygamous horned beetle, Onthophagus taut-us, and monitoring male investment in their testes for 21 generations. Testes size decreased in monogamous lines relative to lines in which sexual selection was allowed to continue. Differences in testes size were dependent on selection history and not breeding regime. Males from polygamous lines also had a competitive fertilization advantage when in sperm competition with males from monogamous lines. Females from polygamous lines produced sons in better condition, and those from monogamous lines increased their sons condition by mating polygamously. Rather than being costly for females, multiple mating appears to provide females with direct and/or indirect benefits. Neither body size nor horn size diverged between our monogamous and polygamous lines. Our data show that sperm competition does drive the evolution of testes size in onthophagine beetles, and provide general support for sperm competition theory.