Major histocompatibility complex (MHC) genes encode proteins crucial for adaptive immunity of vertebrates. Negative frequency‐dependent selection (NFDS), resulting from adaptation of parasites to common MHC types, has been hypothesized to maintain high, functionally relevant polymorphism of MHC, but demonstration of this relationship has remained elusive. In particular, differentiation of NFDS from fluctuating selection, resulting from changes in parasite communities in time and space (FS), has proved difficult in short‐term studies. Here, we used temporal data, accumulated through long‐term monitoring of helminths infecting bank voles (Myodes glareolus), to test specific predictions of NFDS on MHC class II. Data were collected in three, moderately genetically differentiated subpopulations in Poland, which were characterized by some stable spatiotemporal helminth communities but also events indicating introduction of new species and loss of others. We found a complex association between individual MHC diversity and species richness, where intermediate numbers of DRB supertypes correlated with lowest species richness, but the opposite was true for DQB supertypes—arguing against universal selection for immunogenetic optimality. We also showed that particular MHC supertypes explain a portion of the variance in prevalence and abundance of helminths, but this effect was subpopulation‐specific, which is consistent with both NFDS and FS. Finally, in line with NFDS, we found that certain helminths that have recently colonized or spread in a given subpopulation, more frequently or intensely infected voles with MHC supertypes that have been common in the recent past. Overall, our results highlight complex spatial and temporal patterns of MHC‐parasite associations, the latter being consistent with Red Queen coevolutionary dynamics.