To solve the real-time path planning of multi-robots in complex environments, a new immune planning algorithm incorporating a specific immune mechanism is presented. In the immune planning algorithm incorporating a specific immune mechanism, a new coding format for an antibody is first defined according to the impact of the obstacle distribution on the obstacle avoidance behaviors of multi-robots. Then, a new robot immune dynamic model for antibody selection is designed in terms of different impacts of obstacles and targets on robot behaviors. Finally, aiming at the local minimum problem in complex environments and inspired by the specific immune mechanism, a series of appropriate avoidance behaviors are selected through the calculation of a specific immune mechanism to help robots walk out of local minima. In addition, to solve deadlock situations, a learning strategy for the antibody concentration is presented. Compared with four related immune planning algorithms—an improved artificial potential field, a rapidly exploring random tree algorithm, a D* algorithm and a A* algorithm—the simulation results in four static environments show that the paths planned by immune planning algorithm incorporating a specific immune mechanism are the shortest and the path smoothness is generally the highest, which shows its strong planning capability in multi-obstacle environments. The simulation result in a dynamic environment with local minima shows that the immune planning algorithm incorporating a specific immune mechanism has strong planning ability in dynamic obstacle avoidance and in escaping from local minima. Additionally, an experiment in a multi-robot environment shows that two robots can not only avoid static obstacles but also avoid dynamic obstacles, which further supports the validity of the proposed immune planning algorithm incorporating a specific immune mechanism for multi-robots in real environments.