As an important component of intelligent transportation systems, vehicle-to-everything (V2X) provides critical communication support for road safety through real-time interactive and collaborative safety messages between vehicles and their surroundings. However, V2X networks often face channel congestion due to limited communication resources, which seriously threatens road safety. Therefore, this paper proposes a deep reinforcement learning method based on dynamic graph neural networks, which achieves dynamic management and optimization of channel congestion through multi-agent collaborative control. First, a high-dimensional state representation is constructed by utilizing an observation encoder to process the vehicle’s data, which encompasses communication data such as transmission rates and traffic data (e.g., speed and direction). Second, a multi-head adaptive attention mechanism focuses on the important interaction information between vehicles from multiple perspectives, thereby capturing channel busy areas and potential congestion hotspots. Third, a dynamic graph neural network is used to construct a vehicle information interaction graph in real-time by fusing the local and global vehicle information through multilayer graph convolution. Then, a multi-agent actor–critic algorithm is used for intelligent decision-making and strategy optimization. Through the combination of global joint optimization and local real-time decision-making within the multi-agent paradigm of centralized training and decentralized execution, vehicles can learn optimal channel allocation and behavior control strategies in the complex V2X network environment. Finally, the experimental results show that our method outperforms existing methods in terms of the channel busy rate and collision avoidance rate.