Recent experiments by Brunet, Eggers & Deegan (Phys. Rev. Lett., vol. 99, 2007, p. 144501 and Eur. Phys. J., vol. 166, 2009, p. 11) have demonstrated that drops of liquid placed on an inclined plane oscillating vertically are able to climb uphill. In the present paper, we show that a two-dimensional shallow-water model incorporating surface tension and inertia can reproduce qualitatively the main features of these experiments. We find that the motion of the drop is controlled by the interaction of a ‘swaying’ (odd) mode driven by the in-plane acceleration and a ‘spreading’ (even) mode driven by the cross-plane acceleration. Both modes need to be present to make the drop climb uphill, and the effect is strongest when they are in phase with each other.