Infections are one of the major selective pressures acting on humans, and host-pathogen interactions contribute to shaping the genetic diversity of both organisms. Evolutionary genomic studies take advantage of experiments that natural selection has been performing over millennia. In particular, inter-species comparative genomic analyses can highlight the genetic determinants of infection susceptibility or severity. Recent examples show how evolution-guided approaches can provide new insights into host-pathogen interactions, ultimately clarifying the basis of host range and explaining the emergence of different diseases. We describe the latest developments in comparative immunology and evolutionary genetics, showing their relevance for understanding the molecular determinants of infection susceptibility in mammals.