A general elastohydrodynamic lubrication model was developed to consider the nonsphericity of the bearing geometry in hip joint implants, both under the steady and transient conditions. The articulation between the femoral head and the acetabular cup was represented by a nominal ball-in-socket configuration. The nonsphericity was introduced on the acetabular cup and femoral head bearing surfaces in the form of an ellipsoidal surface represented by variations of the radii of curvature given by the three semi-axis lengths of the ellipsoid with regard to a nominal spherical surface. An appropriate spherical coordinate system and solution domain discretization were used to facilitate the numerical simulations. Both the equivalent discrete spherical convolution model and the corresponding spherical fast Fourier transform technique were used to evaluate the elastic deformation of either the spherical or nonspherical bearing surfaces. A fixed-tracked method was also developed to simulate the complex morphology introduced by moving the interface of the nonspherical bearing surfaces. The general methodology for the nonspherical bearing was first applied to investigate the steady-state elastohydrodynamic lubrication of an ellipsoidal cup articulating against a spherical head in a typical metal-on-metal hip joint implant. Subsequently, the problem of an ellipsoidal head articulating against a spherical cup was considered under the transient conditions. The significance of nonsphericity of bearing geometry in hip joint implants due to manufacturing, designing, and wear was discussed. The results obtained showed that the effect of a nonspherical bearing surface geometry on elastohydrodynamic lubrication was dependent on the orientation, the magnitude, and the deviation direction of the nonsphericity. A well-controlled nonsphericity was seen to be beneficial for improving the lubrication.