Heterogeneity in environmental conditions helps to maintain genetic and phenotypic diversity in ecosystems. As such, it may explain why the capacity of animals to mount immune responses is highly variable. The quality of habitat patches, in terms of resources, parasitism, predation and habitat fragmentation may, for example, trigger trade-offs ultimately affecting the investment of individuals in various immunological pathways. We described spatial immunoheterogeneity in bank vole populations with respect to landscape features and co-infection. We focused on the consequences of this heterogeneity for the risk of Puumala hantavirus (PUUV) infection. We assessed the expression of the Tnf-a and Mx2 genes and demonstrated a negative correlation between PUUV load and the expression of these immune genes in bank voles. Habitat heterogeneity was partly associated with differences in the expression of these genes. Levels of Mx2 were lower in large forests than in fragmented forests, possibly due to differences in parasite communities. We previously highlighted the positive association between infection with Heligmosomum mixtum and infection with PUUV. We found that Tnf-a was more strongly expressed in voles infected with PUUV than in uninfected voles or in voles co-infected with the nematode H. mixtum and PUUV. H. mixtum may limit the capacity of the vole to develop proinflammatory responses. This effect may increase the risk of PUUV infection and replication in host cells. Overall, our results suggest that close interactions between landscape features, co-infection and immune gene expression may shape PUUV epidemiology.