With the global adoption of Internet services, service providers are having a difficult time securing their systems, especially against new attacks and intrusions. Various anomalous detection approaches have been developed for protecting WSN from cyber-attacks. However, those systems suffer from the major issues of a high number of false alarms, increased over-fitting, and complexity. Therefore, this paper motivates to develop a novel and intelligent IDS framework for protecting WSN from cyber-attacks. For this purpose, an Intensive Binary Pigeon Optimization (IBiPO) and Bi-directional Long Short-Term Memory (Bi-LSTM) mechanisms are developed for accurate intrusion detection and classification.