The impact of objective and subjective environmental factors on health outcomes has been a topic of significant debate, with a growing body of research acknowledging the role of a physically active lifestyle in promoting health. However, consensus regarding their precise influence remains elusive. This study contributes to these discussions by exploring how individual health outcomes correlate with transport and leisure walking behaviours, set against both the objective and subjective aspects of environmental influences in the context of Wuhan, an inland Chinese megacity. Street view images, multi-source geospatial data and a questionnaire survey were employed to characterise the "5D + Greenery" objective and perceived characteristics of the neighbourhood environment. Multi-group structural equation modelling was utilised to unravel the complex relationship and gender heterogeneity among environmental factors, purpose-specific walking, and overweight. Our results suggest that both objective land use diversity and perceived convenience are significantly associated with overweight. The accessibility of local service facilities and visible greenery promote both transport and leisure walking. While perceived neighbourhood safety encourages transport walking, perceived walkability is positively correlated with leisure walking. Notably, leisure walking, usually considered beneficial, presents a positive association with overweight conditions, acting as a mediation. Gender disparities exist in pathways between the environment and purpose-specific walking, as well as weight. The findings lend support to the planning of an activity-supporting built environment as a crucial strategy for obesity prevention.