The present study employed remote sensing images of the Fen River Basin from 2005, 2010, 2015, and 2020 as the primary data source. The software ENVI, ArcGIS, and Fragstats 4.2 were utilized to measure the landscape pattern index of the Fen River Basin. A collinearity test was conducted to remove any redundant landscape pattern indices. Based on the selected landscape indices, the landscape pattern index values were ascertained as follows. Using the shifting window method, the landscape pattern index of the Fen River Basin was obtained. Second, the habitat quality in the Fen River Basin was assessed using the InVEST model, and the spatial autocorrelation approach was employed to confirm that the habitat quality was spatially autocorrelated. Finally, the spatial impacts of landscape pattern indices on habitat quality were examined using the MGWR model. The results show that (1) the Fen River Basin's overall habitat quality declined between 2005 and 2020; however, the deterioration slowed with time and had a typical "poor in the middle and high around the margins" spatial distribution. The habitat quality of the low-value area continued to increase, the habitat quality of the lower-value area decreased annually, the habitat quality of the middle-value area decreased and then increased, the habitat quality of the higher-quality area tended to increase, decrease, and then increase again, and the habitat quality of the high-quality area decreased annually. (2) The fit of the MGWR model was greater than those of the OLS and traditional GWR models, and it was able to more clearly illustrate the various roles that landscape pattern indices and habitat quality play in one another. (3) Changes in landscape patterns had a major impact on habitat quality; habitat quality was positively impacted by PD and AI, negatively impacted by MESH, and had positive and negative bidirectional effects from CONTAG and AI.