Niche differentiation has long been identified as an essential stabilizing mechanism for the coexistence of sympatric species. Using camera trapping data obtained during 2012–2016, we identified Macaca leonina and M. mulatta as the dominant macaque species in the Naban River Watershed National Nature Reserve (NRW‐NNR), a tropical forest in southwestern China. In general, M. leonina exhibited a wider distribution and greater niche breadth than co‐occurring M. mulatta. According to a fitted maximum entropy model (MaxEnt), M. leonina was predicted to predominantly occur in forest at higher elevation, whereas M. mulatta was predicted at lower elevation; the broadleaved evergreen forest was predicted as the most suitable vegetation for both species to inhabit, while the unsuitable area was bordered by rubber plantation, in which both food scarcity and human disturbance restricted the movement of macaques. Although the niches of these two species highly overlapped across space and time, we also found evidence for their spatiotemporal niche differentiation. When the two species inhabited independent areas with different elevations and vegetation, they maintained a similar activity pattern; however, in the zones of overlap, their activity patterns differed significantly. Further comparative field studies of these two macaques, considering other niche dimensions, are required to ensure their coexistence and long‐term conservation.