With the development of e-commerce, online consumption-a new sustainable consumption mode-has rapidly developed. Online shopping has become an important consumption method for Chinese residents, and the era of online consumption has arrived. Urbanization is an important foundation for the development of online consumption, and its impact on online consumption is becoming increasingly important. In addition, with the decline of fertility in China, the proportion of the elderly population is increasing. As the macro background of the current economic operation of China, population aging has long been a concern of the government. However, the existing research on urbanization, population aging and online consumption is insufficient. In this context, this study is of great significance to promote the sustainable development of the online consumption mode and enrich the theory of resident consumption in the era of the network economy. In this paper, by adopting the system generalized method of moments (GMM), we conducted an empirical analysis of the relationship between urbanization, population aging, and online consumption, based on panel data from 31 provinces in China from 2007 to 2017. Furthermore, we examined the regional heterogeneity of urbanization's online consumption effect. The results reveal that, first, urbanization has a positive relationship with online consumption. Second, urbanization's online consumption effect has regional differences, with the largest positive effect being in the western area of China, the second in the eastern area of China and the smallest in the central area of China. Third, aging inhibits the development of online consumption. Specifically, it mainly includes two aspects. On the one hand, aging has a direct negative impact on online consumption. On the other hand, aging has a moderating effect on urbanization's online consumption effect, which weakens the impact of urbanization. The rising of urban residents' income has significant explanatory power to the change of online consumption in the eastern and western regions. Therefore, the policy implications are as follows: promoting the strategic transformation of urbanization, giving full play to the online consumption effect of urbanization; adjusting and improving population policy to cope with the population aging; constantly raising people's income level and enhancing consumption potential.