Individuals exhibit differences in their microbial composition that have important implications for both population dynamics and ecological processes. The gut microbiome of animals can vary by age, reproductive status, diet, and habitat quality, and directly influences an individual’s health and fitness. Likewise, variation in an individual’s home range can lead to differences in reproductive behaviour, feeding strategies, and fitness. Ungulates (hooved mammals) exhibit species-specific microbiomes and habitat use patterns that differ by season, sex, and age-class, leading to variation among individuals occupying a similar geographic area. Here, we combined fecal microbiome and movement data to assess the relationship between space use and the gut microbiome in a specialist and a generalist ungulate. We captured and GPS radiocollared 24 mountain goats (Oreamnos americanus) and 34 white-tailed deer (Odocoileus virginianus). During captures we collected fresh fecal samples and conducted high-throughput sequencing of the fecal microbiome (i.e. 16S rRNA gene) to quantify gut microbial diversity. We generated Brownian Bridge Movement Models from the GPS location data to estimate core (50%) and home range (95%) sizes and calculated the proportion of use for several important habitat types. An increase in Firmicutes to Bacteroides ratios corresponded to an increase in core range area in both species. In mountain goats we observed a negative relationship between gut diversity and use of both escape terrain and treed habitat, both critical features for this alpine specialist. There were no relationships between habitat use and the gut microbiome in the more generalist white-tailed deer. We hypothesize that larger Firmicutes to Bacteroides ratios confer body size or fat advantages that allow for larger home ranges, and that relationships between gut diversity and disproportionate use of particular habitats is stronger in mountain goats due to their restricted niche relative to white-tailed deer. This is the first study to relate core range size to gut diversity in wild ungulates and is an important proof of concept that advances the potential type of information that can be gleaned from non-invasive sampling.