This study investigates the ultimate bearing capacity of shallow foundations resting on rock masses under earthquakes using upper-bound limit analysis. A modified pseudodynamic method (MPD) that considers the influence of Rayleigh waves is initially used to characterize the spatiotemporal variation in earthquake acceleration. The strength of rock masses is governed by the generalized Hoek‒Brown criterion and the plastic flow at failure is assumed to respect the associated flow rule. The generalized tangential technique is introduced to provide a linear approximation of the strength envelope for capturing the equivalent Mohr‒Coulomb strength parameters. The classic nonsymmetrical multi-block translational mechanism, which is capable of assessing a rock-foundation system under asymmetrical load, is reconstructed to portray the velocity discontinuity of the plastic failure region. Based upon the energy equilibrium theorem of the limit analysis, an analytical solution of seismic bearing capacity is derived and then formulated as a multivariate optimization problem. Comparisons show good agreement with the literature and validate the correctness and rationality of this work. Parametric study indicates that the seismic foundation capacity obtained by MPD tends to be conservative compared to the pseudostatic method with the same seismic coefficients, and that the period of a Rayleigh wave has only a slight effect on the bearing capacity. The failure region is more sensitive to the disturbance coefficient than it is to the other rock strength parameters.