In order to ensure the stable and safe driving of tracked robots in complex farmland environment, this paper proposes a path tracking and obstacle avoidance planning method for tracked robots based on model predictive control. According to the kinematics analysis method, the kinematic model in the form of state equation of the tracked robot is established. Considering the influence of the unavoidable system uncertainty and external disturbance on path tracking accuracy, the path tracking control layer based on MPC theory is designed with control input as constraint. Then, the point-mass model is used to describe the movement of the tracked robot in the work area, so as to reduce the amount of calculation in the path re-planning layer. The obstacle avoidance function is selected according to the proportion of penalty function and the velocity of tracked robot. The complete MPC controller for path tracking and obstacle avoidance planning of tracked robot is established through the combination of path tracking control layer and path re-planning layer. The final results and analysis show that the method proposed in this paper can achieve smooth avoidance of obstacles and improve the path tracking control accuracy of tracked robots.