Genetic diversity is fundamental to maintaining the long‐term viability of populations, yet reduced genetic variation is often associated with small, isolated populations. To examine the relationship between demography and genetic variation, variation at hypervariable loci (e.g., microsatellite DNA loci) is often measured. However, these loci are selectively neutral (or near neutral) and may not accurately reflect genomewide variation. Variation at functional trait loci, such as the major histocompatibility complex (MHC), can provide a better assessment of adaptive genetic variation in fragmented populations. We compared patterns of microsatellite and MHC variation across three Eastern Massasauga (Sistrurus catenatus) populations representing a gradient of demographic histories to assess the relative roles of natural selection and genetic drift. Using 454 deep amplicon sequencing, we identified 24 putatively functional MHC IIB exon 2 alleles belonging to a minimum of six loci. Analysis of synonymous and nonsynonymous substitution rates provided evidence of historical positive selection at the nucleotide level, and Tajima's D provided support for balancing selection in each population. As predicted, estimates of microsatellite allelic richness, observed, heterozygosity, and expected heterozygosity varied among populations in a pattern qualitatively consistent with demographic history and abundance. While MHC allelic richness at the population and individual levels revealed similar trends, MHC nucleotide diversity was unexpectedly high in the smallest population. Overall, these results suggest that genetic variation in the Eastern Massasauga populations in Illinois has been shaped by multiple evolutionary mechanisms. Thus, conservation efforts should consider both neutral and functional genetic variation when managing captive and wild Eastern Massasauga populations.