The invention relates to the field of marine engineering cranes, and particularly relates to a locking mechanism and a locking method of a rotary device of a marine crane. The locking mechanism comprises a locking device and a control device, wherein the locking device and the control device are connected by virtue of a brake cable; the locking device comprises a fixed base, a locking pin and a guide pin, a long hole is formed in the side wall of the fixed base relatively, a round hole is formed in the side wall of the locking pin relatively, the guide pin passes through the long hole of the fixed base and the round hole of the locking pin, and the locking pin can be movably installed in the fixed base; the control device comprises a servo motor which is arranged on a rotary table, both ends of the brake cable are respectively connected with the servo motor and an ear plate hole, and the locking pin can be driven to move up and down by the servo motor through the brake cable so as to lock the rotary table. The control device further comprises a handle which is arranged in a cab, so that locking can be realized in an abnormal power supply condition, the stability and the reliabilityof the marine crane in a non-operating state are effectively guaranteed, the safety of mechanical equipment and working personnel is guaranteed, and the working personnel can simply and convenientlyoperate the locking mechanism to lock.