This paper proposes a method for nonlinear analysis of a rigid pile under lateral load at the crest of clay slope. It is assumed that the ultimate soil resistance in front of the pile and behind the pile vary nonlinearly with depth. The modulus of horizontal subgrade reaction in front of the pile and behind the pile vary nonlinearly with the pile displacement at ground surface. The horizontal shear resistance at the pile base is considered and a bilinear relationship between the shear resistance and the displacement is used. Three distribution patterns of the soil resistance along a pile are also considered. Based on the force and moment equilibrium, the system equations are derived for a laterally loaded rigid pile in sloping ground with different soil resistance distribution patterns. The proposed method is validated by comparing its results with those from field tests, finite element analyses and a theoretical method. Finally, the method is used to analyze the effect of slope angle, pile-soil adhesion factor, height above ground surface of point of load application, pile diameter and embedded length on the lateral response of rigid piles.