Cyber Threat Detection (CTD) is subject to complicated and rapidly accelerating developments. Poor accuracy, high learning complexity, limited scalability, and a high false positive rate are problems that CTD encounters. Deep Learning defense mechanisms aim to build effective models for threat detection and protection allowing them to adapt to the complex and ever-accelerating changes in the field of CTD. Furthermore, swarm intelligence algorithms have been developed to tackle the optimization challenges. In this paper, a Chaotic Zebra Optimization Long-Short Term Memory (CZOLSTM) algorithm is proposed. The proposed algorithm is a hybrid between Chaotic Zebra Optimization Algorithm (CZOA) for feature selection and LSTM for cyber threat classification in the CSE-CIC-IDS2018 dataset. Invoking the chaotic map in CZOLSTM can improve the diversity of the search and avoid trapping in a local minimum. In evaluating the effectiveness of the newly proposed CZOLSTM, binary and multi-class classifications are considered. The acquired outcomes demonstrate the efficiency of implemented improvements across many other algorithms. When comparing the performance of the proposed CZOLSTM for cyber threat detection, it outperforms six innovative deep learning algorithms for binary classification and five of them for multiclass classification. Other evaluation criteria such as accuracy, recall, F1 score, and precision have been also used for comparison. The results showed that the best accuracy was achieved using the proposed algorithm for binary is 99.83%, with F1-score of 99.82%, precision of 99.83%, and recall of 99.82%. The proposed CZOLSTM algorithm also achieved the best performance for multi-class classification among other compared algorithms.