The fuel sloshing in the vehicle fuel tank can cause adverse consequences, especially under resonance conditions, and the vertical baffle may efficiently restrain the fuel sloshing. The current work couples mesh motion and volume of fluid to investigate the effect of baffle height on the liquid sloshing damping effect at different filling levels under resonance conditions. The aim is to explore the optimal baffle height at different fuel filling levels. The results indicate that the best damping performance can be obtained when using baffles with the same height as the fluid height. To reduce the impact pressure on the tank walls, a baffle slightly higher than the free surface height should be used at low filling levels, and a baffle slightly lower than the free surface height should be used at medium filling levels. Compared with high filling level, the baffle is more effective in reducing the sloshing force and moment at low and medium filling levels. A new formula for calculating the energy damping ratio is proposed. At 20% fuel filling level, the energy damping ratio increases continuously as the baffle height increases, and reaches the maximum value of 85.31% when hb/hw = 1.2. At 50% and 80% fuel filling level, the damping ratio reaches the maximum when hb/hw = 1, which is 79.79% and 56.39% respectively. This study provides important theoretical support for the anti-sloshing design of a vehicle fuel tank.