Rock–socketed pile under lateral loading is important in engineering practice. It is very significant to calculate the lateral bearing capacity of rock–socketed piles since few studies focus on this problem. The rock cohesion and instantaneous angle of friction, which have a high correlation with confining pressure, are obtained. Moreover, the strain wedge model is modified from three aspects: the assumption of nonlinear displacement; the stress level related to cohesion and friction angle; and the pile side resistance. Then, the modified strain wedge model is employed to deduce p–y criterion for rock–socketed pile considering Hoek–Brown failure criterion. The fourth-order partial differential equation constructed according to the p–y curve is solved by using the finite difference method. A numerical method with 2 m diameter rock-socketed pile is given to validate the rationality of the proposed method. It is shown that the proposed could predict the pile deformation well, and the responses are considered acceptable.