A lifting system with a three-way motion compensation function, comprising a main arm, a second mobile cart, a first support, a second support, a first mobile cart, a lifting mechanism, and a vessel body, wherein a front end of the main arm is mounted at an upper end of the first mobile cart; a rear end of the main arm is mounted at an upper end of the second mobile cart; a lower end of the first mobile cart is mounted on the first support; a lower end of the second mobile cart is mounted on the second support; the first support and the second support are separately fixed on the vessel body; first road wheel sets are mounted at the upper end of the first mobile cart; the main arm moves left and right; the main arm is driven to move front and back when the first mobile cart and the second mobile cart act synchronously; characterized in that first rails are mounted on two sides of a bottom of the front end of the main arm; the first rails are mounted on the first road wheel sets; concave second rails are mounted on two sides of the rear end of the main arm; second road wheel sets are mounted at the upper end of the second mobile cart and the second road wheel sets are mounted in the concave second rails configured for limiting up-down motion of the main arm; the left and right movement of the main arm is provided through the first road wheel sets and the second road wheel sets; third road wheels are mounted at the lower end of the first mobile cart; fourth rails are symmetrically mounted on two sides of the first support; the third road wheels are mounted on the fourth rails and move along the fourth rails, to drive the first mobile cart to move front and back relative to the first support; fourth road wheels are mounted at the lower end of the second mobile cart; U-shaped third rails are mounted on two sides of the second support; the fourth road wheels are mounted on the U-shaped third rails having a vertical positioning function and configured to move along the U-shaped third rails to drive the second mobile cart to move front and back relative to the second support; and the lifting mechanism for driving a lifted object to move up and down is hinged to the front end of the main arm. a main arm, a second mobile cart, a first support, a second support, a first mobile cart, a lifting mechanism, and a vessel body, wherein a front end of the main arm is mounted at an upper end of the first mobile cart; a rear end of the main arm is mounted at an upper end of the second mobile cart; a lower end of the first mobile cart is mounted on the first support; a lower end of the second mobile cart is mounted on the second support; the first support and the second support are separately fixed on the vessel body; first road wheel sets are mounted at the upper end of the first mobile cart; the main arm moves left and right; the main arm is driven to move front and back when the first mobile cart and the second mobile cart act synchronously; characterized in that first rails are mounted on two sides of a bottom of the front end of the main arm; the first rails are mounted on the first road wheel sets; concave second rails are mounted on two sides of the rear end of the main arm; second road wheel sets are mounted at the upper end of the second mobile cart and the second road wheel sets are mounted in the concave second rails configured for limiting up-down motion of the main arm; the left and right movement of the main arm is provided through the first road wheel sets and the second road wheel sets; third road wheels are mounted at the lower end of the first mobile cart; fourth rails are symmetrically mounted on two sides of the first support; the third road wheels are mounted on the fourth rails and move along the fourth rails, to drive the first mobile cart to move front and back relative to the first support; fourth road wheels are mounted at the lower end of the second mobile cart; U-shaped third rails are mounted on two sides of the second support; the fourth road wheels are mounted on the U-shaped third rails having a vertical positioning function and configured to move along the U-shaped third rails to drive the second mobile cart to move front and back relative to the second support; and the lifting mechanism for driving a lifted object to move up and down is hinged to the front end of the main arm.