With the establishment of the national park system in China, balancing ecological conservation within national parks and development in surrounding areas has become a critical issue. Despite its importance, studies on the scale effects of landscape fragmentation and its relationship with habitat quality (HQ) in these regions remain scarce. Therefore, this study focuses on the Hainan Tropical Rainforest National Park (HTRNP) in China and the surrounding nine cities and counties. The optimal scale for analyzing the spatiotemporal characteristics of landscape patterns, we assessed the best grain size and extent of landscape pattern indices using the regional information loss assessment model, area loss index, and semivariance function analysis. Based on this, the Fragstats and InVEST models analyzed the spatiotemporal evolution of landscape patterns and HQ from 1980 to 2020. Additionally, bivariate spatial autocorrelation theory was applied to examine the spatial correlation between the two. The results show that (1) the landscape indices in the study area vary with grain size and extent. The optimal grain size is 300 m, and the optimal extent is 2 km × 2 km. (2) Over the past 40 years, the landscape pattern of HTRNP has remained stable. In contrast, the surrounding areas exhibit notable spatial differentiation, with landscapes in coastal town centers becoming increasingly fragmented. (3) Over the past 40 years, the overall HQ in the study area has been relatively high, showing a spatial distribution pattern that decreases gradually from the center of HTRNP outward to rural areas, towns, and coastal regions. HTRNP has maintained a high and stable HQ, while the surrounding areas exhibited a decreasing trend in HQ, although the decline was relatively modest. (4) The spatial distribution of HQ aligns closely with landscape patterns, indicating a significant spatial correlation. The landscape connectivity of HTRNP remains high, with consistently superior HQ. In contrast, coastal town centers are characterized by highly fragmented landscapes and poor HQ. This study reveals the spatiotemporal dynamics of landscape patterns and HQ, along with their spatial associations. These findings provide a scientific basis for ecological conservation in national parks and the planning optimization of surrounding areas.