Vehicular ad hoc networks (VANETs) can bolster road safety through the proactive dissemination of emergency messages (EMs) among vehicles, effectively reducing the occurrence of traffic-related accidents. It is difficult to transmit EMs quickly and reliably due to the high-speed mobility of VANET and the attenuation of the wireless signal. However, poor network design and high vehicle mobility are the two most difficult problems that affect VANET’s network performance. The real-time traffic situation and network dependability will also be significantly impacted by route selection and message delivery. Many of the current works have undergone studies focused on forwarder selection and message transmission to address these problems. However, these earlier approaches, while effective in forwarder selection and routing, have overlooked the critical aspects of communication overhead and excessive energy consumption, resulting in transmission delays. To address the prevailing challenges, the proposed solutions use edge computing to process and analyze data locally from surrounding cars and infrastructure. EDGE-RSUs are positioned by the side of the road. In intelligent transportation systems, this lowers latency and enhances real-time decision-making by employing proficient forwarder selection techniques and optimizing the dissemination of EMs. In the context of 5G-enabled VANET, this paper introduces a novel routing protocol, namely, the supercluster-based urban multi-hop broadcast and best forwarder selection protocol (UMB-BFS). The improved twin delay deep deterministic policy gradient (IT3DPG) method is used to select the target region for emergency message distribution after route selection. Clustering is conducted using modified density peak clustering (MDPC). Improved firefly optimization (IFO) is used for optimal path selection. In this way, all emergency messages are quickly disseminated to multiple directions and also manage the traffic in VANET. Finally, we plotted graphs for the following metrics: throughput (3.9 kbps), end-to-end delay (70), coverage (90%), packet delivery ratio (98%), packet received (12.75 k), and transmission delay (57 ms). Our approach’s performance is examined using numerical analysis, demonstrating that it performs better than the current methodologies across all measures.