The proliferation of Mobile Ad hoc Networks (MANETs), where nodes connect with one another to offer the required real-time entertainment services, is where academics are focusing more attention as a result of recent breakthroughs in wireless communication. Decentralised design and wireless connection of MANETs, however, make building safe routing a difficult problem. Artificial Intelligence (AI) and optical technologies have attracted a lot of attention as a way to address these security issues and improve network performance. This study uses a machine learning model to provide a unique security management and routing management method for MANETs. Here, trust-based multi-tier honey pot analysis with stacked reinforcement learning (MHSRL) is used to monitor the security of the network. The linear gradient Distance Vector dynamic Mamdani routing system (LGDVDMR) is used to regulate network routing.For different security-based datasets, experimental analysis is done in terms of throughput, end-end latency, packet delivery ratio, and trust analysis. Generated graph executes both the performance graph and the packet drop. The results of research studies indicate that our method locates the closest node that is the safest and finds problematic nodes with a tolerable load.Proposed technique attained throughput 96%, trust analysis 98%, end-end delay of 59%, packet delivery ratio of 79%.