We use the InVEST model and five periods of land use data from 1980 to 2020 to assess the habitat quality of the Ningxia Hui Autonomous Region in western China, which has characteristics of a typical fragile ecosystem. We further analyze the spatial and temporal characteristics of habitat quality evolution and its relationship with land use and landscape pattern indices to explore the close relationship between regional habitat quality changes and human natural resource conservation and utilization.The research results show that the overall habitat quality of Ningxia Hui Autonomous Region was stable and at a moderate level during the 40 years from 1980 to 2020; Habitat patches with low, high and very high quality occupy a larger proportion of the area, followed by very low and moderate levels. There was a significant spatial aggregation of high and low habitat quality in Ningxia, with high values usually distributed in the northern and southern areas with good natural conditions and low values distributed in areas with frequent human activities and poor natural conditions. The decrease in habitat quality in Ningxia was mainly due to the expansion of cultivated land and construction land, the increase in landscape fragmentation and the resulting decrease in connectivity. On the other hand, due to the implementation of ecological protection measures, such as the project of returning farmland to pasture and grass to forest, the quality of habitats in Ningxia increased. The conclusions of this study support the idea that the conservation of habitat quality in ecologically fragile areas should fully preserve the original natural habitats and reduce the interference of human activities. At the same time, targeted ecological protection policies should be developed to restore the areas where the habitat quality has been damaged and ultimately maintain the stability of biodiversity and ecosystems in ecologically fragile areas.