Determining the environmental factors that contribute to food resource partitioning or overlap is key to understanding the mechanisms of multispecies coexistence. Two ruminants, the Japanese serow (Capricornis crispus) and the sika deer (Cervus nippon), occur sympatrically in Japan, and interspecific interactions between them regarding food resource utilization remain unclear. In this study, we compared the diets of these two sympatric ungulates in two contrasting habitats: a montane forest and an alpine grassland in Mt. Asama. The montane forest provides both broad-leaved trees and graminoids of relatively small quantity, while the alpine grassland provides abundant graminoids. In the montane forest, the serow fed mainly on dicot leaves while the deer fed mainly on graminoids, suggesting partitioning of food resources. By contrast, in the alpine grassland, both species fed mainly on graminoids, resulting in dietary overlap. These results suggest that these two species can partition food resources in habitats with diverse food resources, while their diets tend to overlap in habitats with simple food resource composition. Their coexistence was seemingly facilitated by food resource partitioning in the montane forest and by sharing abundant food in the alpine grassland, suggesting that competition between them is unlikely at this location.