Animals must tailor their life-history strategies to suit the prevailing conditions and respond to hazards in the environment. Animals with lethal infections are faced with a difficult choice: to allocate more resources to reproduction and suffer higher mortality or to reduce reproduction with the expectation of enhanced immunity and late-age reproduction. However, the strategies employed to mediate shifts in life-history traits are largely unknown. Here, we investigate the temperature preference of the fruit fly, Drosophila melanogaster, during infection with the fungal pathogen, Metarhizium robertsii, and the consequence of temperature preference on life-history traits. We have measured the temperature preference of fruit flies under different pathogen conditions. We conducted multiple fitness assays of the host and the pathogen under different thermal conditions. From these data, we estimated standard measures of fitness and used age-specific methodologies to test for the fitness trade-offs that are thought to underlie differences in life-history strategy. We found that fungus-infected fruit flies seek out cooler temperatures, which facilitates an adaptive shift in their life-history strategy. The colder temperatures preferred by infected animals were detrimental to the pathogen because it increased resistance to infection. But, it did not provide net benefits that were specific to infected animals, as cooler temperatures increased lifetime reproductive success and survival whether or not the animals were infected. Instead, we find that cold-seeking benefits infected animals by increasing their late-age reproductive output, at a cost to their early-age reproductive output. In contrast, naive control flies prefer warmer temperatures that optimize early-age reproductive, at a cost to reproductive output at late ages. These findings show that infected animals exhibit fundamentally different reproductive strategies than their healthy counterparts. Temperature preference can facilitate shifts in strategy, but not without inevitable trade-offs.