The problem of liquid sloshing is widespread in the field of naval architecture and ocean engineering. During the sloshing process, the liquid will produce a large slamming force on the bulkhead. At the same time, the coupled sloshing of the liquid in tank and the hull will also affect the floating state and stability of the hull, and even induce safety accidents. The tank sloshing simultaneous with baffles and under rolling excitation is particularly focused in this paper, which is rarely concerned preciously. Based on the theory of fluid dynamics, the program of tank sloshing under large-amplitude rolling conditions by the smoothed particle hydrodynamics method is compiled, and the accuracy of the numerical model is validated through existing experimental results. Furthermore, the slamming pressure and the wetted height of the tank wall are studied for the cases of different excitation amplitudes and excitation frequencies. Then, the dynamic response characteristics of the sloshing tank with vertical and horizontal baffles are studied, and the effects of different baffle lengths are analyzed. The result shows that under rolling excitation the vertical baffle longer than the water depth can mitigate sloshing to some extent, but the vertical baffle whose length is less than the water depth and the horizontal baffles cannot play a role in mitigating the sloshing.