Features extraction in NIDS is a NP-hard problem. To improve the search speed and avoid local minimal, immune is induced into features extraction in NIDS. Similar degree and chroma are defined. Relationship based on NIDS feature code and immune operators are constructed to avoid local minimal and improve speed and quality of the found solution. Experiments are based on standard data set and use genetic algorithm, genetic-immune algorithm and improved genetic-immune algorithm. Results of experiments show that improved genetic-immune algorithm is effective.