Humans punish fairness violations both as victims and impartial third parties, which can maintain cooperative behavior. However, it is unknown whether similar motivations underlie punishment of unfairness in these two contexts. Here, we approach this question by focusing on how both types of punishment develop in children, asking: What motivates young children to punish in response to fairness norm violations? We explore two potential factors: The direct experience of unfair outcomes, and a partner’s fair vs. unfair intentions. Five- and seven-year-olds were given the chance to engage in both 2nd- and 3rd-party punishment in response to either intended or unintended fairness norm violations in a single paradigm. In both age groups, children were more likely to punish when they were directly affected by the allocation (2nd-party punishment) than when they were an uninvolved third party (3rd-party punishment). Reliable 3rd-party punishment was shown only in the older age-group. Moreover, children’s punishment was driven by outcome rather than intent, with equal rates of punishment when unequal outcomes were either the result of chance or the intentional act of another child. These findings suggest that younger children may be mainly motivated to create equal outcomes between themselves and others, while older children are motivated to enforce fairness norms as a general principle.