The prevalence of using the applications for the internet of things (IoT) in many human life fields such as economy, social life, and healthcare made IoT devices targets for many cyber-attacks. Besides, the resource limitation of IoT devices such as tiny battery power, small storage capacity, and low calculation speed made its security a big challenge for the researchers. Therefore, in this study, a new technique is proposed called intrusion detection system based on spike neural network and decision tree (IDS-SNNDT). In this method, the DT is used to select the optimal samples that will be hired as input to the SNN, while SNN utilized the non-leaky integrate neurons fire (NLIF) model in order to reduce latency and minimize devices’ power usage. Also, a rand order code (ROC) technique is used with SNN to detect cyber-attacks. The proposed method is evaluated by comparing its performance with two other methods: IDS-DNN and IDS-SNNTLF by using three performance metrics: detection accuracy, latency, and energy usage. The simulation results have shown that IDS-SNNDT attained low power usage and less latency in comparison with IDS-DNN and IDS-SNNTLF methods. Also, IDS-SNNDT has achieved high detection accuracy for cyber-attacks in contrast with IDS-SNNTLF.