Teaching learning‐based optimization (TLBO) is a popular stochastic algorithm that has recently been widely applied in a variety of optimization problems since its start. In TLBO algorithm, the concept of chaos not only shows a vital effect in its convergence but also plays a substantial role to balance of exploration and exploitation through evolution. However, TLBO is quickly trapped in local optima and premature convergence seems when applied to sophisticated complex functions. To handle these problems, we introduced an improved TLBO algorithm using chaotic concept. To achieve ability to search for exploration and exploitation, new phase called chaotic phase is added in original TLBO algorithm. The proposed method is thoroughly evaluated on benchmark test suites. The numerical result show that proposed method is relatively effective in adapting the chaotic value regarding original TLBO in terms of solution quality and convergence rate. In addition, performance of proposed method is evaluated on benchmark KDD Cup 99 intrusion dataset. The experimental results demonstrate that proposed method achieves higher predictive accuracy, detection rate, false alarm rate, and provided more significant features as compared with other wrapper techniques.