Urban function plays a vital role in shaping environmental outcomes, yet its spatial organization remains underexplored compared to urban form. This study develops a land function connectivity index (LFCI) to quantitatively evaluate how urban land functions are spatially arranged and how they relate to environmental pollution. Using Hangzhou, China, as a case study, we examine the relationship between LFCI and PM2.5 concentrations, a widely used proxy for environmental pollution, through spatial econometric models, including the ordinary least squares, spatial error model and spatial lag model. Our findings reveal significant spatial autocorrelation and a positive relationship between LFCI and PM2.5 concentrations, with spatial heterogeneity between urban and rural areas. Moreover, to capture potential nonlinearities, we incorporate quadratic terms of LFCI in the models and observe an inverted U-shaped relationship in urban areas, where PM2.5 initially increases with LFCI but decreases after surpassing a threshold. This suggests that a well-integrated and compact land use structure may help reduce environmental impacts. In contrast, rural areas exhibit a more linear or U-shaped relationship, indicating a higher sensitivity to development intensity. The findings highlight the need for context-specific planning strategies, advocating for the re-utilization of urban land over rural expansion to improve environmental quality. Overall, this research provides quantitative guidance for the development of targeted land management strategies aimed at strengthening urban resilience and sustainability.