Trajectory planning plays a crucial role in achieving unmanned excavator operations. The quality of trajectory planning results heavily relies on the level of rules extracted from objects such as scenes and optimization objectives, using traditional theoretical methods. To address this issue, this study focuses on professional operators and employs machine learning methods for job trajectory planning, thereby obtaining planned trajectories which exhibit excellent characteristics similar to those of professional operators. Under typical working conditions, data collection and analysis are conducted on the job trajectories of professional operators, with key points being extracted. Machine learning is then utilized to train models under different parameters in order to obtain the optimal model. To ensure sufficient samples for machine learning training, the bootstrap method is employed to adequately expand the sample size. Compared with the traditional spline curve method, the trajectories generated by machine learning models reduce the maximum speeds of excavator boom arm, dipper stick, bucket, and swing joint by 8.64 deg/s, 10.24 deg/s, 18.33 deg/s, and 1.6 deg/s, respectively; moreover, the error does not exceed 2.99 deg when compared with curves drawn by professional operators; and, finally, the trajectories generated by this model are continuously differentiable without position or velocity discontinuities, and their overall performance surpasses that of those generated by the traditional spline curve method. This paper proposes a trajectory generation method that combines excellent operators with machine learning and establishes a machine learning-based trajectory-planning model that eliminates the need for manually establishing complex rules. It is applicable to motion path planning in various working conditions of unmanned excavators.