Socioecological theories predict that, in mammals, feeding and mating competitions affect male and female energetic conditions differently but energetic studies investigating both sexes simultaneously are rare. We investigated the effect of socioecological factors on the energetic conditions of male and female western chimpanzees, a long-lived species with high degrees of male-male competition. We used behavioural data collected on one chimpanzee community in the Taï National Park over 12 months, phenological data and urinary c-peptide (UCP) measures, a marker of energy balance. We found a positive effect of food availability on UCP levels in both sexes. Dominance rank also affected chimpanzee UCP levels. High-ranking females had higher UCP levels than low-ranking ones but only in periods when no oestrus females were present in the community. In contrast, high-ranking males had higher UCP levels than low-ranking males in the presence of oestrus females but lower UCP levels in their absence. Our results suggest that oestrus female presence lessened the competitive advantages of high-ranking females in feeding competition and that low-ranking males bore higher energetic costs related to mating competition than high-ranking ones. Yet caution should apply in interpreting these results since the statistical model was only close to significance. High-ranking male and female chimpanzees spent significantly less energy. Furthermore, all chimpanzees significantly spent less time feeding and spent more energy when food availability was high. Finally, our behavioural measure of energy intake and expenditure did not correlate with UCP levels highlighting the value of non-invasive hormonal markers for field studies.Significance statementGeneral socioecological theories hypothesize that the social grouping dynamic and energetics of females are highly influenced by food competition, whereas in males, competition for sexual partners is more influential for these factors. Recent studies in the non-invasive physiological assessment of energy balance in primates have begun to test the implied relationship between chimpanzee socioecology and individual energetic condition, with inconsistent results. However, only a few studies have investigated this relationship concurrently for both sexes. Here, using non-invasive measures of energy balance in wild western chimpanzees, we found that the energetics of both males and females are related to ecological factors, such as food availability. However, female energy balance appears also to be related to increased male mating competition, as this can result in increased aggression directed from males to females, with apparent energetic costs for females.