Deciphering patterns of genetic variation within a species is essential for understanding population structure, local adaptation and differences in diversity between populations. Whilst neutrally evolving genetic markers can be used to elucidate demographic processes and genetic structure, they are not subject to selection and therefore are not informative about patterns of adaptive variation. As such, assessments of pertinent adaptive loci, such as the immunity genes of the major histocompatibility complex (MHC), are increasingly being incorporated into genetic studies. In this study, we combined neutral (microsatellite, mtDNA) and adaptive (MHC class II DLA-DRB1 locus) markers to elucidate the factors influencing patterns of genetic variation in the African wild dog (Lycaon pictus); an endangered canid that has suffered extensive declines in distribution and abundance. Our genetic analyses found all extant wild dog populations to be relatively small (N(e) < 30). Furthermore, through coalescent modelling, we detected a genetic signature of a recent and substantial demographic decline, which correlates with human expansion, but contrasts with findings in some other African mammals. We found strong structuring of wild dog populations, indicating the negative influence of extensive habitat fragmentation and loss of gene flow between habitat patches. Across populations, we found that the spatial and temporal structure of microsatellite diversity and MHC diversity were correlated and strongly influenced by demographic stability and population size, indicating the effects of genetic drift in these small populations. Despite this correlation, we detected signatures of selection at the MHC, implying that selection has not been completely overwhelmed by genetic drift.