Ancient genomics can directly detect human genetic adaptation to environmental cues. However, it remains unclear how pathogens have exerted selective pressures on human genome diversity across different epochs and affected present-day inflammatory disease risk. Here, we use an ancestry-aware approximate Bayesian computation framework to estimate the nature, strength, and time of onset of selection acting on 2,879 ancient and modern European genomes from the last 10,000 years. We found that the bulk of genetic adaptation occurred after the start of the Bronze Age, <4,500 years ago, and was enriched in genes relating to host-pathogen interactions. Furthermore, we detected directional selection acting on specific leukocytic lineages and experimentally demonstrated that the strongest negatively selected immunity gene variant, the lipopolysaccharide-binding protein gene (LBP) D283G, is hypomorphic. Finally, our analyses suggest that the risk of inflammatory disorders has progressively increased in post-Neolithic Europeans, partly due to antagonistic pleiotropy following genetic adaptation to pathogens.