Based on the fundamental principles of spatial heterogeneity and landscape ecology, landscape mosaic (LM) offers a more effective method for capturing variations in landscape spatial components, patterns, and ecological functions compared to land use and land cover (LULC). This advantage is particularly pronounced when employing the InVEST model to evaluate habitat quality (HQ), as field surveys often yield highly variable results that challenge the accuracy and applicability of LULC-based assessments. This paper focuses on the Taihang Mountain area in Hebei Province as the study region, utilizing the Principal Component Analysis (PCA), Self-Organizing Map (SOM), and Euclidean Distance (ED) model to achieve LM classification of the area. Based on this, the InVEST-HQ assessment is conducted, employing both OLS and GWR models to analyze the correlation between HQ and LM landscape patterns. The results indicate that (1) seven major LULC types were reclassified into nine pillar LM types and eleven transitional LM types, with a significant number of ecotone types emerging between different LULC types, among which cultivated land plays the most prominent role; (2) from 2000 to 2020, the overall HQ in the study area exhibited a continuous deterioration trend, particularly marked by a notable increase in functional areas of HQ areas classified as Level I; (3) factors such as the complexity of patch edges, the continuity between patches, and the diversity of patch types all significantly impact HQ. This study introduces an innovative methodological framework for HQ assessment using LM classifications within InVEST model, offering a robust foundation for comprehensive biodiversity monitoring and informed ecological management in the study area.