Sloshing response of liquid in a rigid cylindrical container with a rigid annual baffle subjected to lateral excitation has been studied. The complicated liquid domain is separated into several simple sub-domains by introducing the artificial interfaces. The analytical solutions of potential function corresponding to every sub-domain are obtained by using the method of separation of variables and the superposition principle. The total potential function under lateral excitation is taken as the sum of the container potential function and the liquid perturbed function. The expression of the liquid perturbed function is obtained by introducing the generalized coordinates. On the base of the natural frequencies and modes having been obtained by the sub-domain method, the orthogonality among the sloshing modes has been demonstrated. Substituting the potential functions into the free surface wave equation establishes the dynamic response equation of liquid. Then, the generalized coordinates are solved. The sloshing surface displacement, the hydrodynamic pressure distribution, the resultant hydrodynamic force and moment are discussed for the containers subjected to harmonic and seismic lateral excitation, respectively.