In robotic excavation, hybrid position/force control has been proposed for bucket digging trajectory following. In hybrid position/force control, the control mode is required to switch between position- and force-control depending on whether the bucket is in free space or in contact with the soil during the process. Alternatively, impedance control can be applied such that one control mode is employed in both free and constrained motion. This paper presents a robust sliding controller that implements impedance control for a backhoe excavator. The control law consists of three components: an equivalent control, a switching control and a tuning control. Given an excavation task in world space, inverse kinematic and dynamic models are used to convert the task into a desired digging trajectory in joint space. The proposed controller is applied to provide good tracking performance with attenuated vibration at bucket-soil contact points. From the control signals and the joint angles of the excavator, the piston position and ram force of each hydraulic cylinder for the axis control of the boom, arm, and bucket can be determined. The problem is then how to find the control voltage applied to each servovalve to achieve force and position tracking of each electrohydraulic system for the axis motion of the boom, arm, and bucket. With an observer-based compensation for disturbance force including hydraulic friction, tracking of the piston ram force and position is guaranteed using robust sliding control. High performance and strong robustness can be obtained as demonstrated by simulation and experiments performed on a hydraulically actuated robotic excavator. The results obtained suggest that the proposed control technique can provide robust performance when employed in autonomous excavation with soil contact considerations.