Since clonal selection algorithm lacks of adaptive capacity when solving multimodal problems, a novel adaptive immune algorithm,which was based on immune danger theory, immune network and clonal selection theory, was proposed to emulate the entire immune mechanisms and to enhance the performance for complex multimodal problems. The environment of antibody population and the corresponding danger signal of each antibody were incorporated into the process of immune response, which preserved the diversity of antibody population and then alleviated the premature of the algorithm to some extent. The algorithm was proved theoretically to be convergent with Markov chain model. Simulation results on the classical benchmark functions showed that, compared to clonal selection algorithm, this algorithm has good performance of global convergence and multimodal searching ability, and has a fast convergence speed with good quality of solution.