Underactuated systems are the representative of a large class of systems. This paper presents a new method for the design of sliding surface for a class of second order underactuated system in which a virtual input is considered in unactuated subsystem. A sliding mode controller is proposed to ensure sliding along the sliding surface. A problem of slosh free-motion of a container is considered as representative of a typical class of underactuated system. A simple pendulum model is considered to represent the lateral slosh. Extensive simulation studies are conducted with the controller to demonstrate the proposed approach. © 2009 Inderscience Enterprises Ltd.