Wireless networks are been used now-a-days. The most important fact about wireless network is it is mobile. It is thus used in many fields. One of the most important applications of wireless networks is Mobile Ad hoc NETwork (MANET) in which all the nodes work as both transmitter and receiver. MANETs are used in various fields like military, industry and emergency recovery. In order to provide adequate security against multiple attacks, the researchers are of the opinion that detection-based schemes should be incorporated in addition to traditionally used prevention techniques. Intrusion Detection and Prevention System (IDPS) is an effective defense mechanism that detects and prevents the security attacks at various levels. In recent work a polynomial key is employed for achieving useful key generation process and a polynomial is generated to compute the pair-wise key but it can be easily detected by the attacker so to improve the security in IDPS system, this work proposes the secure routing using Novel SEcured Keys Generation (NSEKG) against IDPS system. This proposal implements with two major keys: Secure Key (SeK) and Sharing key (ShK) creation is performed via the use of the User Property based Artificial Bee Colony (UPABC) algorithm and the frequency based behavior with certainty measurement on routing paths. These SeK and ShK keys creation with UPABC scheme exploits the encrypted value of the packets and the decryption determine whether the route reply is the result of a malicious node or not. The proposed NSEKG -IDPS system is very effective for communication attacks and needs to be gradually improved in order to detect multiple attacks. The performance is evaluated primarily in accordance with the subsequent metrics like Packet delivery ratio (PDR), Routing Overhead (RO), End-End-Delay (E2E), and Throughput