In this paper, we propose an algorithm to generate optimal trajectory path considering the complex operating environment of excavator front part composed of the boom, arm, and bucket by using genetic algorithm. In order to express motion in space, we propose a method of coordinate plane space of grid cell, and define the fitness value by path distance. After generating chromosome candidates for each motion unit based on the polygonal structure of the front part of the excavator, we calculate the fitness value about each chromosome. The crossover and mutation operations between the chromosomes selected through roulette wheel of top 20% are repeatedly performed to generate paths with optimal fitness values. This paper verifies the structural analysis of the front part of excavator and the utility of the genetic algorithm to optimize the path in the grid space.