Recent discoveries relating depression to inflammation and immune function may help to solve an important evolutionary puzzle: If depression carries with it so many negative consequences, including notable costs to survival and reproduction, then why is it common and heritable? What countervailing force or compensatory advantage has allowed susceptibility genes for depression to persist in the population at such high rates? A priori, compensatory advantages in combating infection are a promising candidate, given that infection has been the major cause of mortality throughout human history. Emerging evidence on deeply rooted bidirectional pathways of communication between the nervous and immune systems further supports this notion. Here we present an updated review of the infection-defense hypothesis of depression, which proposes that moods - with their ability to orchestrate a wide array of physical and behavioral responses - have played an adaptive role throughout human history by helping individuals fight existing infections, as well as helping both individuals and their kin avoid new ones. We discuss new evidence that supports several key predictions derived from the hypothesis, and compare it with other major evolutionary theories of depression. Specifically, we discuss how the infection-defense hypothesis helps to explain emerging data on psychoimmunological features of depression, as well as depression's associations with a diverse array of conditions and illnesses - including nutritional deficiencies, seasonal changes, hormonal fluctuations, and chronic disease - that previous evolutionary theories of depression have not accounted for. Finally, we note the potential implications of the hypothesis for the treatment and prevention of depression.