The invention discloses a special robot with a wave compensation function and a wave compensation method, and belongs to the field of offshore ship operation. The front end of a small arm is connected with the rear end of a wrist mechanism, the front end of the wrist mechanism is rigidly connected with an end effector actuator, the rear end of the wrist mechanism comprises a first actuator and a second actuator, the front end of the wrist mechanism comprises a differential mechanism and two supporting arms, and a supporting frame is arranged in the middle of the wrist mechanism and fixedly connected with the front end of the small arm. The left supporting arm and the right supporting arm are fixedly connected to the front lateral sides of the supporting frame, and the differential mechanism is arranged between the two supporting arms. The differential mechanism is composed of four bevel gears, a deflection shaft and two pitching driving shafts, wherein the deflection shaft is vertically arranged, the central line of the first pitching driving shaft and the central line of the second pitching driving shaft are collinear and perpendicular to the central line of the deflection shaft, and the two pitching driving shafts are symmetrically arranged at the left side and the right side of the deflection shaft. The wrist mechanism has three independent freedom degrees so that the robot can have more postures, and rolling, pitching and yawing, caused by wind waves, of a ship can be compensated in real time.