Individual differences in inhibitory control, an aspect of cognition, are found in many species. How this variation links to affective states is not much explored, and could be relevant for welfare. As less fearful, more optimistic, individuals may act more impulsively, inhibitory control could link to less negative, more positive, affective states. Alternatively, poorer inhibitory control could associate with more negative, less positive, affective states, as poorer inhibitory control can result in individuals being less able to adapt to changing environments and more likely to show stereotypies. We here explored in three cohorts (N = 209) of captive red junglefowl, the ancestor of domestic chickens, how inhibitory control associated with affective states. Specifically, we measured inhibitory control with a detour task, and negative and positive affective states with a tonic immobility test and a cognitive judgement bias test, respectively. Cognition and behaviour can differ between ages and sexes. Therefore, we investigated how inhibitory control related to affective states in younger chicks (≈2.5 weeks old), older chicks (≈5 weeks old) and sexually mature adults (≈28 weeks old) of both sexes. In younger chicks, poorer inhibitory control associated with less negative, more positive, affective states. We found no relationship between inhibitory control and affective states in older chicks or adults, nor sex differences regarding how inhibitory control related to affective states. Overall, our results suggest that inhibitory control can link to affective states and that the nature of these links can change over ontogeny.