The liquid sloshing in a moving partially filled rectangular tank with a vertical baffle is investigated. A numerical algorithm based on the volume of fluid (VOF) technique is used to study the nonlinear behavior of liquid sloshing. The numerical model solves the complete Navier-Stokes equations in primitive variables by using of finite difference approximations with the moving coordinate system. The ratio of baffle height to the initial liquid depth has been changed in the range of 0 <= h(B)/h <= 1.2. The critical baffle height to reach the roof of the tank and the baffle height beyond the liquid does not get over the baffle anymore have been investigated. The vortex originated by the flow separation from the baffle tip became weaker with increasing the baffle height. In order to assess the accuracy of the method used, some results with baffle height are compared with the experimental results. Comparisons show good agreement for slosh loads in the cases investigated. The free surface elevation and the time variations of pressures have been also presented. (C) 2011 Elsevier Ltd. All rights reserved.