This paper proposed a five-axis trajectory generation method based on kinematic constraints and optimisation. The optimisation algorithms based on double solutions filtering and singularity determination are designed during inverse kinematics, which can choose the appropriate solution set within the movement ranges of rotary axes. Trajectory generation with kinematic constraints for each axis is significant in high speed machining, however, the component acceleration for each drive does not only depend on the value of tangential velocity (feed), but also on its changing rate. It is inefficient to deal with this problem by using general iterative methods. This paper proposes an approximate constraint method which keeps constant feed for each small segment by eliminating the effect from feed changing, and then connects the constant feed stages by trapezoidal acceleration transition. Simulation for a five-axis tool path in impeller machining is implemented. The results show that the solution profile which overruns the angle movement range is filtered, and both the velocity and acceleration on each axis are confined.