Uneven traffic demand in satellite networks can lead to link congestion and influence network communication quality. To tackle this problem, we propose a state‐aware routing algorithm based on traffic prediction to disperse network traffic. Reducing the onboard processing requirements, the routing algorithm in this paper introduces a software‐defined network to decouple the control plane and data plane of the satellite network. Also, to better sense the trend of network state, the routing algorithm devises a Spatial‐Temporal Attention Fusion Graph Neural Network (STAFGNN) to predict the future network state by capturing the spatial‐temporal correlation of satellite network traffic. In the control plane, the routing algorithm senses the network state by predicting the future satellite traffic and aggregates the real‐time states of neighboring satellites to identify the load level of the zone. The data plane forwards data based on the control information. Based on the routing algorithm in this paper, multipath routing is designed to reduce the probability of link congestion by dispersing each end‐to‐end traffic. The simulation results demonstrate that the routing algorithm in this paper reduces the number of congestion links and balances the load distribution. The proposed algorithm provides an idea to introduce deep learning to solve the load balancing problem in satellite networks.