This paper aims to examine the determinants of green purchasing intentions among different resident groups in a developing-country context. We first expand the theory of planned behaviour (TPB) and build a theoretical model based on green purchasing intention, including attitude, perceived behavioural control, subjective norms, environmental concern, habit, and socio-demographic characteristics (i.e., age, gender, residential area, and educational level). Following this, we collect 552 questionnaires from residents in Tianjin Municipality, China. We use partial least squares structural equation modelling (PLS-SEM) to analyse the green purchasing intention of the population sample and then employ a multi-group analysis (MGA) to explore the group differences in residents' green purchasing intention. The results show that green purchasing intention is significantly and positively influenced by attitude, perceived behavioural control, subjective norms, and environmental concern but not by habit. The relationship chain of environmental concern→subjective norms→purchasing intention is the strongest. The results of the MGA show that for residential-area groups, the relationships between attitudes, perceived behavioural control, and habits and purchasing intention differ significantly between the downtown group and the outside-the-city group. For the educational-level groups, the relationship between environmental concern and subjective norms differs significantly between the high-education group and the low-education group. Finally, these findings contribute to the literature on the TPB model on green purchasing intention and provide some suggestions for the local government and green marketers.