Understanding the relationships between species and their pattern of coexistence is essential in conservation planning. Rüppell’s fox and sand cat are two poorly known species of desert areas that coexist in most parts of the desert belt of Africa and the Middle East. However, their habitat selection in many parts of their distribution are unknown. In this research, using the data collected from a three-year monitoring plan, we investigated the relationship between the den sites of Rüppell’s fox and sand cat and habitat variables based on the generalized linear mixed model (GLMM) method. The results showed that for Rüppell’s foxes, only the density of rodent burrows had a significant and positive effect. In the sand cat model, in addition to prey, vegetation density (P-value < 0.05) and vegetation height (P-value < 0.10) had significantly positive effects and elevation had a significantly negative effect (P-value < 0.10). We found that the sand cat is more specialized in habitat selection and depends more on the habitat cover. While the Rüppell’s fox chose a more diverse range of soil and vegetation classes, the sand cat selected its den sites exclusively in sandy loam soils with the predominant cover of Haloxylon spp. and Caligonum spp. Acting as a generalist species, Rüppell’s fox displayed a more pronounced response to human presence and selected dens with a broader view of their surroundings. These findings enhance our understanding of mesocarnivore coexistence in desert regions and provide valuable insights for the conservation planning of these species.