Long bone ecomorphology has proven effective for paleohabitat reconstructions across a wide range of mammalian clades. Still, there is no comprehensive framework to allow interpretation of long bone morphological variation within and between different monophyletic groups. Here, we investigated the use of humerus morphometry to classify living members of the orders Carnivora and ungulates based on their preferred habitats. Using geometric morphometrics, we extracted three different kinds of humerus shape data describing interspecific variation with and without accounting for evolutionary allometry and phylogenetic signal. The traditional a priori categorization of species in open, mixed, and closed habitats was employed in combination with selected subsets of shape variables to identify the best-predictive models for habitat adaptation. These were identified based on the statistical performance of phylogenetic and non-phylogenetic discriminant analyses and then applied to predict habitats on a subsample of fossil species. Size-free shape data combined with phylogenetic discriminant analyses showed the highest rate of accuracy in habitat classification for a combined sample of carnivorans and ungulates. Conversely, when the two groups were investigated separately, traditional shape data analyzed with phylogenetic discriminant function analyses provided models with the greatest predictive power. By combining carnivorans and ungulates within the same methodological framework we identified common adaptive features in closed habitat-adapted species that show compressed epiphyses, while open habitat-adapted species have expanded epiphyses. These morphologies evolved to allow significant degree of direction switches during locomotion in closed habitats compared to open habitat-adapted species whose forelimb joints evolved to stabilize articulations for increasing speed.