It is important to search the position of the dangerous sliding surface and to design the reinforcement measures in the study of the slope stability. At present, anti-sliding pile is one of the popular reinforcement measures. In this paper, to optimal design the anti-sliding pile, the residual thrust method (RTM) and genetic algorithm are carried out, while the idea that based on the position of the largest anti-sliding force rather than the most dangerous sliding surface to design the anti-sliding piles is presented. The new idea eliminates the possible unsafe situation. In the process of the optimization design of anti-sliding pile, firstly, chromosomes in the genetic algorithm are coded by using decimal method. Secondly, taking the residual thrust as the fitness function in the genetic algorithm, cross probability and mutation probability are all adjusted according to the fitness of individual population, while the best individual population is saved as population of the next step so that to improve the efficiency. Finally, the sliding surface which needs the largest anti-sliding force is searched out. The reasonability and the reliability of the idea are verified by an example.