The invention relates to a hoisting device with anti-collision function for ship maintenance, which includes a main girder, a hoisting device and two brackets, and also includes a protection mechanism and four anti-collision mechanisms, and the anti-collision mechanism includes a second support rod , a moving rod, two first support rods, two moving sleeves, two springs, two contacts and two trigger assemblies, the protection mechanism includes a guide rail, a moving base, a driving assembly, a rotating shaft, a roller, The connecting wire and the carabiner, the trigger assembly includes a support sleeve and a connecting rod, and the drive assembly includes a motor, a first gear and a second gear. In the hoisting equipment with anti-collision function used for ship maintenance, through the protection The mechanism connects the operator with the main beam, which improves the safety of the operator and the practicability of the gantry crane. Under the action of the anti-collision mechanism, the probability of collision of the gantry crane is reduced, and the probability of damage to the gantry crane is reduced. , improving the safety of the gantry crane.