In order to optimize the network layout of urban agglomerations, improve the comprehensive benefits of transportation networks and promote the sustainable development of urban agglomerations, this paper studies the main trunk line selection model of the Beijing–Tianjin–Hebei high-speed railway (HSR). Firstly, the characteristics of cities in urban agglomeration are analyzed, and the economic capacity, transportation capacity, passenger turnover and network characteristics of urban nodes are selected as evaluation indexes. A node importance model and a line urgency model were established to obtain the value of the importance of urban nodes and the urgency of each line in the urban agglomeration. Secondly, the DBSCAN is used to cluster the city nodes, and the city nodes are divided into four grades. With the goal of maximizing the urgency of the lines and considering the constraints of the urban node level, the optimization model of the Beijing–Tianjin–Hebei backbone network selection is constructed. The backbone lines of the Beijing–Tianjin–Hebei urban agglomeration are obtained, and the selection results of backbone lines are analyzed, which lays a foundation for the design and optimization of the HSR operation scheme in urban agglomeration. The planned backbone network can basically realize the commuting between the important urban nodes in the Beijing–Tianjin–Hebei urban agglomeration to achieve the goal of driving and alleviating the operation of the branch line. It can accelerate the development of the internal traffic of the urban agglomeration. In addition, it has certain practical significance and practical value.