Currently, Identification and detection of intrusions in ad-hoc network is a demanding and significant task. Numerous methodologies have been proposed for detecting the intrusions. But, still ad-hoc networks face high-level of internal and external security attacks. Limitations in previous Intrusion Detection System (IDS) provide a way for the development of reliable IDS based routing, which is an independent challenge. In this paper, Meticulous Elephant Herding Optimization based Protocol (MEHOP) is proposed to select the feature of a node using Support Vector Machine (SVM), find the route to destination in an optimized manner and finally send the data to the destination. SVM algorithm is applied to classify the nodes from malicious node. MEHOP is a metaheuristic algorithm designed to make updations from the selected individuals. Once when the intrusions are detected and avoided, the performance of the ad-hoc network will improve. This research use NS2.35 to evaluate the performance. Results indicate that there exist an improvement in the network performance after detecting and avoiding the intrusions.