Information on diet breadth and preference can assist in understanding links between food resources and population growth and inform habitat restoration for rare herbivores. We assessed the diet of the endangered Pacific pocket mouse using metabarcoding of fecal samples and compared it to plant community composition in long‐term study plots in two populations on Marine Corps Base Camp Pendleton, San Diego County, CA. Fecal samples (n = 221) were collected between spring 2016 and fall 2017 during monthly live‐trap surveys. Concurrently, percent cover and plant phenology were measured in plots centered on trap locations. Fecal samples were sequenced with paired‐end reads of the internal transcribed spacer 2 region of the nuclear ribosomal gene, and the resulting amplicons were matched to a regionally specific database. Seventy‐three plant taxa were detected, which were mostly forbs and perennial herbs (70–90%). Diet composition differed between populations, years, seasons, and plots. Overall, diet and local habitat composition in plots were significantly correlated. However, we detected some differences in above‐ground seed availability and proportion in fecal samples that indicate diet preferences for some forbs, perennial herbs, and native bunch grasses over perennial shrubs and non‐native grasses. This is the first study of PPM to pair plant phenology surveys with diet metabarcoding to estimate resource selection, and results suggest that managing habitat for diverse native forb communities and reducing non‐native grass cover may be beneficial for this critically endangered species.