Polar bears (Ursus maritimus) rely on annual sea ice as their primary habitat for hunting marine mammal prey. Given their long lifespan, wide geographic distribution, and position at the top of the Arctic marine food web, the diet composition of polar bears can provide insights into temporal and spatial ecosystem dynamics related to climate-mediated sea ice loss. Polar bears with the greatest ecological constraints on diet composition may be most vulnerable to climate-related changes in ice conditions and prey availability. We used quantitative fatty acid signature analysis (QFASA) to estimate the diets of polar bears (n = 419) in two western Canadian Arctic subpopulations (Northern Beaufort Sea and Southern Beaufort Sea) from 1999 to 2015. Polar bear diets were dominated by ringed seal (Pusa hispida), with interannual, seasonal, age- and sex-specific variation. Foraging area and sea ice conditions also affected polar bear diet composition. Most variation in bear diet was explained by longitude, reflecting spatial variation in prey availability. Sea ice conditions (extent, thickness, and seasonal duration) declined throughout the study period, and date of sea ice break-up in the preceding spring was positively correlated with female body condition and consumption of beluga whale (Delphinapterus leucas), suggesting that bears foraged on beluga whales during entrapment events. Female body condition was positively correlated with ringed seal consumption, and negatively correlated with bearded seal consumption. This study provides insights into the complex relationships between declining sea ice habitat and the diet composition and foraging success of a wide-ranging apex predator.