As a man of science, Dr. Ferguson would have wanted us to stick to the facts. But they're pretty sparse in his case. We know he was Scottish; we know he tended the sick and wounded in Samuel Bellamy's pirate crew.
At least he tried to. A ship's surgeon had few supplies and none of the antibiotics we count on today. So when something got infected, the answer was often just to cut it off. The surgeon grasped the limb tightly, since the wide-awake patient wasn't likely to sit still. Then he cut as quickly as he could and cauterized the stump with a red-hot ax.
But there may have been more to Dr. Ferguson. Many of Scotland's citizens were unenthusiastic about King George I, who'd been imported from Germany. Some even launched a rebellion in 1715, and the good doctor may have been part of it. If so, turning pirate might have been his way of escaping punishment when the revolt failed.