Mobile ad hoc network (MANET) is an important field of research that comprises of moveable nodes. These nodes communicate with each other through wireless links. Therefore, it becomes essential to design a secure network as it finds applications in different fields where data and communication are important like that in defense areas and disaster rescue operations. This paper focuses on detecting Blackhole nodes in MANETs and preventing it from the same. In this work, Ad hoc On-Demand Distance Vector (AODV) is employed as a routing mechanism and a secure network is established using Artificial Bee Colony (ABC) algorithm as an optimization technique in combination with Artificial Neural Network (ANN) as a classification algorithm to identify the Blackhole nodes. Simulations are carried out in MATLAB and the efficiency of the network in terms of Throughput, Packet Delivery Ratio (PDR), End-to-End Delay and Energy Consumption are measured. Throughput and PDR have been increased by 11.11%, 4.9 %, whereas end- to- end delay has been reduced by 4.93% as compared to existing work proposed by Ashish et al.[6].