Disease emergence is accelerating with global changes. Understanding by which mechanisms host populations can rapidly adapt will be crucial for management practices. Pacific oyster mortality syndrome (POMS) imposes a substantial and recurrent selective pressure on oyster populations, and rapid adaptation may arise through genetics and epigenetics. In this study, we used (epi)genome-wide association mapping to show that oysters differentially exposed to POMS displayed genetic and epigenetic signatures of selection. Consistent with higher resistance to POMS, the genes targeted included many genes in several pathways related to immunity. By combining correlation, DNA methylation quantitative trait loci, and variance partitioning, we revealed that a third of phenotypic variation was explained by interactions between the genetic and epigenetic information, ~14% by the genome, and up to 25% by the epigenome alone. Similar to genetically based adaptation, epigenetic mechanisms notably governing immune responses can contribute substantially to the rapid adaptation of hosts to emerging infectious diseases.