Landscape patterns have a large impact on biodiversity in ecosystems. As a proxy for biodiversity research, assessing changes in habitat quality (HQ) induced by land-use/land-cover (LULC) changes will provide a scientific foundation for ecological protection and land resource management, especially in the ecologically fragile regions such as mountainous areas. Based on land-use data covering the period from 1990 to 2020 from the Taihang Mountains of Hebei Province, this paper selected 10 landscape metrics at the class and landscape levels to examine the dynamics of LULC. Then, this study evaluated HQ by employing the Integrated Valuation of Ecosystem Services and Tradeoffs (InVEST) model and quantitatively analyzed the impact of land use changes on HQ using a geographically weighted regression (GWR) model. The results showed that arable land, grassland and forestland were the main land categories in the study area, and the major changes were the conversion of arable land and grassland to construction land during 1990–2020. During the research period, landscape patches tended to fragment, shape complexity and varied and were evenly distributed. Overall, the region had a high HQ, but the average HQ has exhibited a declining trend in the past 30 years. In addition, changes in HQ were significantly related to land-use changes, and the areas dominated by construction land or arable land, which were closely related to anthropogenic activities, had a relatively low HQ. To balance the tradeoff between economic development and ecological integrity, a social-ecological systems perspective is needed in the design of political-economic policies. This research could improve our understanding of the effects of land-use pattern dynamics on HQ, which has important significance in preserving biodiversity, safeguarding ecological security, and achieving the sustainability of the ecological environment.