Open-sea ship-to-ship transfer operation is an alternative way to avoid port congestion. This process involves a relatively small vessel which transports containers between the harbour and a large cargo ship equipped with a container crane. However, the presence of disturbances and uncertainties caused by harsh open-sea conditions can produce an excessive sway to the hoisting ropes of the crane system. This paper addresses the problem of robust sliding mode control for offshore container crane systems subject to bounded disturbances and uncertain parameters. The mathematical model of an offshore container crane is first derived whereas the effects of ocean waves and gusty winds are taken into account. Then, based on the linear quadratic regulator (LQR) design, a sliding surface is obtained to meet the required performance and stable dynamics for the closed-loop system. Finally, a robust sliding mode controller is proposed to drive the state trajectories of the offshore container crane system towards the sliding surface in finite time and maintain them subsequently on that surface. Simulation results are given to show that the proposed controller can significantly suppress the effects of uncertainties and disturbances from the vessels wave- and wind-induced motion and wind drag force on the payload.