And it appears that it thanked the men with several swishes of its tail before diving back in the water.
The incident was captured on video and is going viral in Malaysia where it was shared on Facebook and WhatsApp.
The rescuers were excited when the whale swished its tail, thanking them.
At the beginning of the video, the men are heard saying this shark came to their boat because it needs help.
They saw the rope around its body and a fisherman hooked a pole through the rope to pull the animal closer.
One man used a cleaver to cut the rope off the shark, the largest known surviving fish species.
The incident was filmed off the coast of Bintulu in Sarawak and was shared on Facebook by the Malaysian Animal Association, getting 100,000 views.
While the men were cutting the rope, the shark stayed still and close to the boat. It is as if the shark is letting them cut the rope and allowing them to remove it, slowly, from its body.
After the rope was removed, it moved its tail several times as it swam off, and the fishermen were heard saying goodbye to the fish. They were speaking in Malay.
The fishermen then removed the rope from the water. -/TISG