Habitat selection is complex due to density dependence and functional responses, defined as variation in relative habitat use depending on availability. In this study we unite these concepts by empirically testing for density‐dependent functional responses in habitat selection using a large herbivore, elk Cervus canadensis manitobensis, as a model species. Theory on density‐dependent habitat selection predicts specialised behaviour when densities are low with a gradual switch to generalist behaviour (more even selection of habitat) as competition intensifies. This suggests that functional responses in habitat selection should be positive when competition is low, but that density may have a negative effect on the functional response due to constraining effects of competition on habitat use and availability. We tested this prediction using data from Global Positioning System (GPS) collared elk (n = 33) and empirical data on spatiotemporal variation in local density during winter in Riding Mountain National Park, Manitoba, Canada (2002–2011). As local density increased, winter home range size decreased and the proportion of mixed forest (providing shelter and forage to elk) used and available within the home range also decreased. Our resource selection function (RSF) revealed clear density‐dependent effects in selection, being strongest (or weakest) for high quality (or low quality) habitat types at lowest observed density leading to more even selection as densities increased. The functional response in mixed forest selection was negatively affected by local density. Increasing availability of mixed forest in the home range was associated with higher selection at low density (positive functional response); no effect of availability on selection at moderate density (no functional response); and lower selection as availability increased at high density (negative functional response). Our study demonstrates that this process is largely driven by the negative effect of density on home range size as it constrains use and availability of habitat.