1. For energetically limited organisms, life-history theory predicts trade-offs between reproductive effort and somatic maintenance. This is especially true of female mammals, for whom reproduction presents multifarious energetic and physiological demands. 2. Here, we examine longitudinal changes in the gut virome (viral community) with respect to reproductive status in wild mature female chimpanzees Pan troglodytes schweinfurthii from two communities, Kanyawara and Ngogo, in Kibale National Park, Uganda.3. We used metagenomic methods to characterize viromes of individual chimpanzees while they were cycling, pregnant and lactating.4. Females from Kanyawara, whose territory abuts the park's boundary, had higher viral richness and loads (relative quantity of viral sequences) than females from Ngogo, whose territory is more energetically rich and located farther from large human settlements. Viral richness (total number of distinct viruses per sample) was higher when females were lactating than when cycling or pregnant. In pregnant females, viral richness increased with estimated day of gestation. Richness did not vary with age, in contrast to prior research showing increased viral abundance in older males from these same communities. 5. Our results provide evidence of short-term physiological trade-offs between reproduction and infection, which are often hypothesized to constrain health in long-lived species.