In this paper, a manipulator of the bionic mantis robot is designed inspired by the anatomical structure of the mantis front leg. A geometrical method is utilized to calculate the forward kinemics. Then, by analyzing the mantis motion video frame by frame, each of the front leg joints angles is measured in crawling and preying motion, which are used as interpolation conditions to solve the planned trajectory for manipulator by cubic spline interpolation. In some circumstance, the planned joint angles may exceed its limitation. By undermining the interpolation conditions, the problem is transformed from solving a cubic spline function to optimization. Finally, particle swarm optimization with variable inertia weight is introduced to optimize the planned trajectory. The result indicates that the trajectory, smoother after optimization could effectively imitate the motion of mantis front leg within the joint rotation range, which lays the basis for further research on the motion control.