Electric vehicles have advantages of simple operation and sustainable development, which have been widely used. Obstacle avoidance is a very important part of the autonomous driving of electric vehicles. It is of great significance to the development of autonomous vehicles. This paper proposes an autonomous obstacle avoidance control algorithm based on the genetic algorithm (GA), which solves the problem that traditional algorithms can only avoid obstacles horizontally. Based on the genetic algorithm and cluster behavior rules, three corresponding velocity terms are designed by kinematics and dynamics. The obstacle avoidance ability of the proposed algorithm is evaluated by the fitness function designed in this paper. Finally, simulation results of Ubuntu show that the final fitness is 0. 92, 0. 87 and 0. 8 when the corresponding self-starting speed is 4, 6 and 8 m/ s, respectively. Four of the six fitness functions are exactly 1 (completely collision free). It is concluded that the proposed autonomous obstacle avoidance control algorithm has advantages of high stability, simple operation and strong obstacle avoidance ability.