Host’s fitness can be affected by its genotype and gut microbiota, defined as the microbes living in the host’s intestinal tract. This study explored how the genetic diversity of the host influences its bacterial communities in the context of captive breeding programs, for the critically endangered European mink (Mustela lutreola). As stated by the ecosystem on a leash model, loss of host genetic diversity may lead to changes in immunomodulation and will therefore induce modifications of the gut microbiota. We investigated variation in the gut bacteria through 16S rRNA metabarcoding, related to the genetic diversity of European mink held in captivity in two breeding centers representing separate breeding stocks originating from the western and eastern populations. The genetic diversity of the host was assessed through diversity analysis of the adaptive MHC class I and II genes as well as neutral microsatellite markers. Results indicate lower diversity in neutral and MHC class I genes for the western population, and the opposite for MHC class II. A lower MHC class II gene variability led to an increase in microbial phylogenetic diversity and in abundance depending on the presence of specific MHC-II motifs. Those results seem to be linked to management practices that differs between the two programs, especially the number of generations in captivity. Long term Ex situ conservation practices can thus modulate gut microbial communities, that might potentially have consequences on the survival of reintroduced animals. We suggest strategies to foster genetic diversity in captive breeding program to mitigate the effects of genetic drift on those small, isolated populations.