The latest advancements in wireless communication promotes the researchers to concentrate more in the expansion of Mobile Ad hoc Networks (MANETs), where nodes communicate each other to provide the demanded real time infotainment services. However, due to wireless connectivity and decentralized architecture, constructing secure routing is still a challenging issue in MANETs. Therefore, in this paper, A Machine Learning and Trust Based AODV Routing Protocol (ML-AODV) to mitigate Flooding and Blackhole Attacks in MANET is proposed. Primarily, cooperative intermediate nodes in the network are selected through trust estimation at each node to avoid (flooding attack) unnecessary transmission of huge number of routing packets to nonexistent destinations. Towards this, the node distinct metrics like Hop Count (HC), Residual Energy (RE), and Link Expiration Time (LET) are considered for trust estimation. The nodes with highest trust value are chosen as trusted relay forwarders to find the optimal paths with reduced packet drop rate (Blackhole attack). Further, finds best optimal path to eliminate the energy disparity and delay for packet transmission using machine learning based Artificial Neural Network (ANN) with Support Vector Machine (SVM) classifier. Here, SVM is used to identify the intruder in the selected route to improve efficiency and intrusion detection accuracy. The performance of the proposed ML-AODV is carried out using NS-2 and compared over existing routing schemes under attack. Based on the simulation results, the proposed ML based AODV exhibits improved throughput to 4% and reliability to 44% over existing approaches. In addition, delay, routing overhead, packet loss ratio are reduced to 12%, 15%, and 10% respectively.