With the development of intelligent mining, autonomous driving will be the basic function of intelligent Load Haul Dump (LHD). Trajectory planning is the key part of autonomous driving. Due to the articulated structure, the motion state variables of the front and rear bodies are strongly nonlinear, leading to complex nonlinear collision avoidance constraints. In addition, the articulated angle and angular velocity of the LHD have physically constraints. At the same time, the terminal attitude constraint should be considered since LHD is a mining equipment. All these factors bring great difficulties to LHD trajectory planning and none of the existing methods can deal with these factors directly. In order to solve these problems, according to the most common working scenario, a novel trajectory planning method is proposed for autonomous LHD based on numerical optimization, leading to a safe and feasible time-space trajectory for efficient production. The novelty of this work is the introduction of a longitudinal and lateral trajectory planning for the typical duty cycle of LHD. More importantly, by the ingenious concept for modeling, there are two salient features of the proposed method. Firstly, no angles are used as the decision variable, and secondly, the collision constraints of the rear car are not directly considered. Through this way, the number of nonlinear constraints and the complexity of the model can keep in a reasonable level, which makes the model easy to solve. At the same time, by giving the collision-free condition and limiting the heading angular velocity, the generated trajectory is collision-free and satisfies the physical constraints of articulated angle. Case studies confirm the effectiveness of the proposed method. Adopting the proposed method to generate a spatiotemporal trajectory is beneficial to ensure safety and improve production efficiency.