Conflict arises among social organisms when individuals differ in their inclusive-fitness interests. Ant societies are excellent models for understanding how genetic relatedness mediates conflict intensity. However, although conflicts within colonies typically arise over offspring production, the role of larvae as actors in social conflict has received little attention. We develop and empirically test kinselection theory of larval egg cannibalism in ant societies. Specifically, we investigate how selection for cannibalism is mediated by nestmate relatedness and larval sex in a mathematical model and then test the model’s predictions by measuring cannibalism levels in eight ant species with varying nestmate relatedness. In line with our theoretical predictions, cannibalism levels in larvae were significantly influenced by relatedness and sex. Increased relatedness was associated with reduced levels of cannibalism, indicating that larval behavior is mediated by inclusive-fitness considerations. Levels of cannibalism were significantly higher in male larvae, and our model suggests that this is due to sex differences in the benefits of cannibalism. By examining the selfish interests of larvae and the constraints they face in a social environment, our study presents a novel perspective on conflict in ants and on the evolution of selfish elements in social systems in general.