Urban shrinkage is a global phenomenon, and it will coexist with urban growth for many years. At the same time, the network connection between cities continuously improved due to the construction of the transportation and information networks.However, the relationship between urban network externalities and urban population growth/shrinkage remains unclear. Therefore,based on high-speed railway(HSR) flow data, a spatial econometric model is used to explore the mechanism behind urban population growth and shrinkage from the perspective of network externalities in China. The results indicate that: 1) the urban network experiences a certain clubbing effect. Growing cities that are strongly connected are concentrated along China's main railway lines and the southeastern coastal areas, while shrinking cities that are weakly connected are distributed at the periphery of the network. 2) Moreover, the network externality disregards spatial distance and together with the agglomeration externality influences the growth and shrinking of cities. 3) Urban economic development still promotes the development of Chinese cities. However, the improvement of the urban economy has a negative cross-regional spillover effect on neighboring cities due to urban competition. 4) Lastly, Local spillovers of urban network externalities are positive, while cross-regional ones are negative. Consequently, the government needs to promote the construction of multi-dimensional network connections between cities to promote cities' sustainable development. This study reveals the relationship between urban network externalities and urban development, enriches the theories of network externalities and urban growth/shrinkage, and provides a reference for regional coordinated development.