Infanticide is well documented in chimpanzees and various hypotheses have been proposed to explain this behavior. However, since infanticide by chimpanzees is relatively rare, it has thus far not been possible to thoroughly test these hypotheses. Here we present an analysis of the largest dataset of infanticides from a single community of chimpanzees, a full record of all intracommunity infanticides and failed attempts at infanticide over a 24-year period for the Sonso community of chimpanzees in the Budongo Forest, Uganda. We use these data to test four hypotheses for this behavior: the sexual selection hypothesis, male mating competition, resource competition, and meat acquisition. Our dataset consisted of 33 attacks on 30 victims, 11 of which were 'definite' infanticides, four of which 'almost certain', and nine were 'suspected', while nine were 'attempted' infanticides. The majority of attacks where the perpetrators were known (23) had only male attackers and victims were disproportionately young (two-thirds of victims with known ages were under 1 week old). Our data best support the sexual selection hypothesis for infanticide. Cannibalism was infrequent and partial, suggesting meat acquisition was a by-product of infanticide, and there was no evidence to suggest that infanticide was part of a male strategy to eliminate future competitors. Infanticide by females was rare, but we suggest sexual selection, operating through intra-sexual competition, may also be responsible for infanticide by females.