Sharp ecological boundaries often present animals with abrupt transitions in various resources, including the availability of food, potentially creating strong selective gradients. Yet little is known concerning how animals respond to abrupt shifts in resources, especially when gene flow may limit local adaptation. Here, we used DNA metabarcoding and untargeted metabolomics of fecal samples to begin characterizing the foraging ecology of two closely related rodents (Neotoma bryanti and N. lepida) across a sharp ecological boundary. We find abrupt transitions in diet and metabolomic signatures that coincide with the rapid habitat transition. Further, we show that individuals have habitat-specific diets that are dominated by distinctly toxic plants that likely require different metabolic processing. Our approach allows detailed characterization of diet and metabolic processing of food plants, which can provide evolutionary ecologists and wildlife biologists much needed insight into the nutritional and physiological ecology of the systems they study and manage.