Adults and older children are more likely to punish a wrongdoer for a moral transgression when the victim belongs to their group. Building on these results, in violation-of-expectation experiments (n = 198), we examined whether 2.5-year-old toddlers (Exps. 1 and 2) and 1-year-old infants (Exps. 3 and 4) would selectively expect an individual in a minimal group to engage in third-party punishment (TPP) for harm to an ingroup victim. We focused on an indirect form of TPP, the withholding of help. To start, children saw a wrongdoer steal a toy from a victim while a bystander watched. Next, the wrongdoer needed assistance with a task, and the bystander either helped or hindered her. The group memberships of the wrongdoer and the victim were varied relative to that of the bystander and were marked with either novel labels (Exps. 1 and 2) or novel outfits (Exps. 3 and 4). When the victim belonged to the same group as the bystander, children expected TPP: At both ages, they detected a violation when the bystander chose to help the wrongdoer. Across experiments, this effect held whether the wrongdoer belonged to the same group as the bystander and the victim or to a different group; it was eliminated when the victim belonged to a different group than the bystander, when groups were not marked, and when either no theft occurred or the wrongdoer was unaware of the theft. Toddlers and infants thus expect individuals to refrain from helping an ingroup victim's aggressor, providing further evidence for an early-emerging expectation of ingroup support.