Habitat quality plays an important role in the dynamics and stability of wildlife metapopulations. However, the benefits of high-quality habitat may be modulated by the presence of an environmentally persistent pathogen. In some cases, the presence of environmental pathogen reservoirs on high-quality habitat may lead to the creation of ecological traps, wherein host individuals preferentially colonize high-quality habitat, but are then exposed to increased infection risk and disease-induced mortality. We explored this possibility through the development of a stochastic patch occupancy model, where we varied the pathogen's virulence, transmission rate and environmental persistence as well as the distribution of habitat quality in the host metapopulation. This model suggests that for pathogens with intermediate levels of spread, high-quality habitat can serve as an ecological trap, and can be detrimental to host persistence relative to low-quality habitat. This inversion of the relative roles of high- and low-quality habitat highlights the importance of considering the interaction between spatial structure and pathogen transmission when managing wildlife populations exposed to an environmentally persistent pathogen.