In order to improve driving safety and comfort in hilly terrain, at the same time to ensure the accuracy of sowing, spraying and harvesting, terrain adaptability is needed for hilly tractor. A robotic hilly tractor is designed. The original contribution of this study is the development of two types of terrain adaptive sliding mode control algorithms for attitude adjusting of the vehicle body and the working implement. The terrain-adaptive principle and control constraints of the vehicle body attitude adjusting and the inclination angles following of the working implement to the terrain are introduced. The dynamic model of the attitude adjusting and the terrain following are established. To eliminate destructive additional torque on the transmission system during attitude adjustment, a model reduced integral sliding mode control algorithm combined with feedforward control is proposed, which can ensure the precise synchronization of the left-right swing mechanism under time-varying nonlinear disturbances. A third-order sliding mode control algorithm with differential observation, which can realize the fast and non overshoot tracking of a third-order nonlinear working implement to the terrain change even if only one state variable can be measured. The validity of the above control algorithm is verified by simulation and field tests.