Path planning of patrol robot in substation is a complex combinatorial optimization problem. Unlike the classical TSP problem, the coordinates of inspection line in substation do not have complete connectivity. Conventional optimization methods are difficult to solve such problems. Therefore, an improved genetic algorithm is proposed for the route planning. Firstly, the working environment of the robot is modeled by using topological graph. Then, the special crossover operator, adaptive mutation operator and elimination operator are used to reverse mutation of the eliminated individuals in each generation, and the new individuals are re-added to the population. The mutation probability is adjusted with the number of iterations, so as to connect with each other. Continuous planning space is directly optimized. The simulation results show that compared with the simulated annealing algorithm, the traditional genetic algorithm and the improved adaptive genetic algorithm based on individual similarity (ISAGA), the average path length of the proposed algorithm is shortened by 4.9%, 8.3% and 3.1% respectively, and it has better convergence and stability, and can play a better role in the actual inspection task.