In industrial machinery units in which handle with high loads, hydraulic cylinders are often used to actuate the manipulators. The nonlinear effects of friction in the hydraulic cylinders can be a problem if they disturb the motion of the hydraulic servo system.Friction compensation is a prerequisite for accurate in a hydraulic servo system. This paper presents anintelligent nonlinear friction compensation framework,which the purpose is to develop a friction compensator strategy based on adaptive twolayer fuzzy controller. Thecompensator Generalized Maxwell-Slip fuzzy,combined with fuzzy controller, will be implemented to reduce the lackperformance resulting from friction. The electiveness of this approach is demonstrated by experiments on the direct drive servo hydraulic system.