The CNC cam grinding contour accuracy is influenced by the complexity of the cam profile and periodic disturbance caused by end effect and friction of the grinding system. In order to enhance the contouring performance, a contour error compensation is adopted. The repetitive learning control (RLC) and a cross-coupled controller (CCC) is combined to compensate the contour error. The repetitive control (RC) is employed for each individual axis to obtain a good tracking performance. Theoretical analyses and detailed simulation results show that the designed control system makes cam grinding system high performance of cam contour accuracy.