The paper proposes a new approach to efficiently control a three-dimensional overhead crane with 6 degrees of freedom (DoF). Most of the works proposing a control law for a gantry crane assume that it has five output variables, including three positions of the trolley, bridge, and pulley and two swing angles of the hoisting cable. In fact, the elasticity of the hoisting cable, which causes oscillation in the cable direction, is not fully incorporated into the model yet. Therefore, our work considers that six under-actuated outputs exist in a crane system. To design an efficient controller for the 6 DoF crane, it first employs the hierarchical sliding mode control approach, which not only guarantees stability but also minimizes the sway and oscillation of the overhead crane when it transports a payload to a desired location. Moreover, the unknown and uncertain parameters of the system caused by its actuator nonlinearity and external disturbances are adaptively estimated and inferred by utilizing the fuzzy inference rule mechanism, which results in efficient operations of the crane in real time. More importantly, stabilization of the crane controlled by the proposed algorithm is theoretically proved by the use of the Lyapunov function. The proposed control approach was implemented in a synthetic environment for the extensive evaluation, where the obtained results demonstrate its effectiveness.