Due to the dense deployment and the diversity of user service types in the 5G HUDN environment, a more flexible network selection algorithm is required to reduce the network blocking rate and improve the user’s quality of service (QoS). Considering the QoS requirements and preferences of the users, a network selection algorithm based on Dueling-DDQN is proposed by using deep reinforcement learning. Firstly, the state, action space and reward function of the user-selected network are designed. Then, by calculating the network selection benefits for different types of services initiated by users, the analytic hierarchy process is used to establish the weight relationship between the different user services and the network attributes. Finally, a deep Q neural network is used to solve and optimize the proposed target and obtain the user’s best network selection strategy and long-term network selection benefits. The simulation results show that compared with other algorithms, the proposed algorithm can effectively reduce the network blocking rate while reducing the switching times.