Captain Blood by Rafael Sabatini

Doctor Peter Blood cares little for the affairs of nobles and kings and is content to tend to his patients and to his garden. But, when he tends to the wounds of a rebel officer his act of kindness involves him in the affairs of the British Crown whether he wants to be or not.

Tried as a rebel and sentenced to be a plantation slave in Jamaica, Blood must labor for a man he despises and dream of his freedom. Until the Spanish attack the colony and his dream turns into reality.