In this paper the ant colony algorithm is applied to path planning problem in 3-D space for robot. First of all, the space between the origin where the robot is located and destination was divided into a three dimensional grid, at the same time the valid path from origin to destination is defined, then all the ants will leave from the origin, selecting next vertex independently in three dimensional grid, to the destination on a valid path. The simulated experiment shows that the algorithm is efficient and has a great convergence rate.