Background: Although evolutionary novelty by gene duplication is well established, the origin and maintenance of essential genes that provide entirely new functions (neofunctionalization) is still largely unknown. Drosophila is a good model for the search of genes that are young enough to allow deciphering the molecular details of their evolutionary history. Recent years have seen increased interest in genes specifically required for male fertility because they often evolve rapidly. A special class of genes affecting male fertility, the paternal effect genes, have also become a focus of study to geneticists and reproductive biologists interested in fertilization and sperm-egg interactions. Results: Using molecular genetics and the annotated Drosophila melanogaster genome, we identified CG14251 as the Drosophila paternal effect gene, ms(3)K81 (K81). This assignment was subsequently confirmed by P-element rescue of K81. A search for orthologous K81 sequences revealed that the distribution of K81 is surprisingly restricted to the 9 species comprising the melanogaster subgroup. Phylogenetic analyses indicate that K81 arose through duplication, most likely retroposition, of a ubiquitously expressed gene before the radiation of the melanogaster subgroup, followed by a period of rapid divergence and acquisition of a critical male germline-specific function. Interestingly, K81 has adopted the expression profile of a flanking gene suggesting that transcriptional coregulation may have been important in the neofunctionalization of K81. Conclusion: We present a detailed case history of the origin and evolution of a new essential gene and, in so doing, provide the first molecular identification of a Drosophila paternal effect gene, ms(3)K81 (K81).