Routing is a key function in Wireless Sensor Networks (WSNs) since it facilitates data transfer to base stations. Routing attacks have the potential to destroy and degrade the functionality of WSNs. A trustworthy routing system is essential for routing security and WSN efficiency. Numerous methods have been implemented to build trust between routing nodes, including the use of cryptographic methods and centralized routing. Nonetheless, the majority of routing techniques are unworkable in reality due to the difficulty of properly identifying untrusted routing node activities. At the moment, there is no effective way to avoid malicious node attacks. As a consequence of these concerns, this paper proposes a trusted routing technique that combines blockchain infrastructure, deep neural networks, and Markov Decision Processes (MDPs) to improve the security and efficiency of WSN routing. To authenticate the transmission process, the suggested methodology makes use of a Proof of Authority (PoA) mechanism inside the blockchain network. The validation group required for proofing is chosen using a deep learning approach that prioritizes each node's characteristics. MDPs are then utilized to determine the suitable next-hop as a forwarding node capable of securely transmitting messages. According to testing data, our routing system outperforms current routing algorithms in a 50% malicious node routing scenario.