I learned about seven years ago that I was the direct descendant of James Ramsay, one of the first and most effective opponents of slavery. He was effective because for 19 years in the 18th century he was a clergyman on St Kitts, an island in the Caribbean crowded with vastly profitable sugarcane plantations worked by slaves. This former Royal Navy surgeon had a deeper knowledge of the horrors of slavery than many other abolitionists because he was employed by plantation owners to treat their slaves.

He admitted with anguish that he could do little for men, women and children who were hungry, over-worked, ill-clad and brutalised to the point of death, but he could describe the sufferings that he saw in great and graphic detail. He told, for instance, how a cart whip in the hands of a skilful slave driver "cuts out flakes of skin and flesh with every strike". He was witness to the merciless and arbitrary power of the slave owners. He wrote that "a half-starved negro, may, for breaking a single cane, which probably he himself has planted, be hacked to pieces with a cutlass".

It should not make much difference to find oneself related to some historic figure, but of course it does in terms of interest and empathy. Research into my ancestor also had the attraction not of discovering secrets, but of unearthing facts not difficult to find but largely forgotten. I wondered if family legend, eight generations on, had exaggerated his role, but historians of slavery agree on his significance as a pioneer opponent of slavery. Though well known in his day, his early death in 1789, 18 years before Britain's abolition of the slave trade, meant that abolitionist leaders such as William Wilberforce and Thomas Clarkson are today much better known.

Download the new Independent Premium app Sharing the full story, not just the headlines

Nevertheless, The Dictionary of National Biography firmly concludes that Ramsay was "the single most important influence in the abolition of the slave trade". In recent years, his works have become more easily available, including his most influential, An Essay on the Treatment and Conversion of African Slaves in the British Sugar Colonies published in 1784. Its bland title reflects warnings from friends that he should tone down his denunciation of slavery, though this did not save him from a torrent of insults and libels. One vehement opponent of freeing the slaves, the Duke of Clarence, later King William IV, lamented that "the business of this sort of freedom was begun by a Mr Ramsay".

His writings give the clearest and most level-headed contemporary account of the day-to-day life of slaves in St Kitts and the nearby island of Nevis. In response to ferocious criticism from plantation owners and managers, he could, for an Anglican clergyman, launch brisk counter-attacks against his critics, describing how slave girls were "sacrificed to the lust of white men; in some instances their own fathers", and how the mistresses of slave girls earned pin money by hiring them out as prostitutes. Not surprisingly, a pro-slavery newspaper in St Kitts denounced what he had written as "unpardonable, indecent, unjust, ungenerous".

But what really gives James Ramsay's writings their impact is that they are so obviously based on his encyclopaedic knowledge of the day-to-day lives of the owners, managers, overseers and slaves. He describes the relentless routine of the plantations, in which the slaves were ultimately worked until disabled or dead, emphasising that it would be more profitable and in their own interest for their owners to treat them better. As it was, slaves were ground down by relentless overwork and punishments. "The discipline of plantation is as exact as that of a regiment; at four o'clock in the morning, the plantation bell rings to call the slaves into the fields." The slaves, who cost £60 each to buy, then spent the next 16 hours or more tending the cane in the fields, bringing it to the mill and boiling it until it became sugar. Every so often the mill machinery "grinds off a hand, or an arm, of those drowsy worn down creatures who feed it".

When not producing sugar, slaves were forced to gather fodder for the cattle and horses. Beatings were inflicted for every minor infraction. "It is in the master's power to render his slaves' lives miserable every hour by a thousand nameless stratagems."

Slaves often appealed to him to ask their masters not to punish them on medical grounds, but there was little he could do. Ramsay refers to one surgeon who was asked by a judge to amputate the limb of a slave that had been deliberately mangled, but "he answered that he was not obliged to be the instrument of another man's cruelty. His Honour then had it performed by a cooper's adze, and the wretch was then left to bleed to death, without attention, or dressing."

The nightmare of cruelty that greeted my ancestor when he arrived in St Kitts in 1762 did not come as a surprise. Born in 1733 at the small port of Fraserburgh on the coast near Aberdeen, he was poor but well-educated. He trained as a doctor and joined the Royal Navy as a surgeon on a man-of-war called the Arundel, where he gained a reputation for keeping the sailors in good health. In 1759, the Arundel stopped a British slave ship called the Swift, bound for Barbados, which had been captured the day before by a French privateer. Discovering that there was an epidemic of dysentery on board, the French had taken slaves that could be sold and abandoned the rest. When Ramsay boarded the ship, he found 100 sick slaves lying in a mixture of blood, vomit and excreta. He was so appalled by what he saw that he slipped and fell returning to the Arundel, breaking his thigh, which made it impossible to continue ship-board life. On his return to Britain, he was ordained as a clergyman, something he had always wanted to be, but had been prevented by early poverty. He took over two livings in St Kitts, where he was in demand as a doctor by those running the plantations as well as for their slaves. "I visited the plantations daily," he said. "I saw their clothes and provisions distributed. I was frequent witness to their punishments. They frequently applied to me to intercede with their masters. In short, the whole economy of the sugar plantation was before me."

It did not take long for the planters to discover that he was encouraging the slaves to visit his church. He was peculiarly well informed about slavery as a business because soon after his arrival he had married Rebecca Akers, whose family was involved in the slave trade. He later made the point that the planters were not necessarily more depraved than other people, but did not regard their slaves as human beings. On the contrary, he said, in terms of intellect slaves "show no signs of inferiority to Europeans". It was for views like these that he was shunned by many in his congregation, one of the most powerful men on the island declaring that no whites "ought to come and hear him" as the Reverend Ramsay was fit company only for blacks. Though strongly supported by friends in the Navy, he was forced to return to Britain in 1781 where he became the vicar of a small church in Teston outside Maidstone, Kent.

In the event, his persecutors might have done better to let him stay in St Kitts. On his return to Britain, he was well placed to inspire and inform the nascent anti-slavery movement that was taking shape in the 1780s. His Essay was published in 1784; and though probably more understated than its author wanted, it had a long- lasting effect. The plantation owners may have made a second mistake in attacking him and his book so vituperatively in newspaper articles and pamphlets. He himself noted that their invective was counter-productive. After some temporary notoriety, his Essay, he said, was ready to be "swallowed up in the gulf of oblivion, when a host of foes were providentially raised up to force it on the public, and cause the subject to be agitated". One planter had even challenged him twice to a duel.

He died five years after his Essay made him briefly famous. But on St Kittts and Nevis, he is entirely forgotten. Sugar cane, the source of so much wealth and cruelty, is no longer cultivated. The islands are full of relics of slavery and the sugar industry in the shape of tumble-down brick chimneys, half-ruined mills and plantation houses. Some of the latter have been converted to luxury hotels.

The emphasis today is on the romantic allure of the Caribbean rather than the hideous brutality of slavery. Cane fields have reverted to scrubland interspersed with holiday villas. On Nevis, troops of chattering green vervet monkeys scamper everywhere, to the amusement of tourists and the anger of farmers whose fruit they eat. In a fine display of insensitivity, the government at one point suggested adopting the sugar mill, where so many slaves lost their limbs, as the national emblem. Local people may feel ambivalent about, or indifferent to, the enslavement of their ancestors, but this was too much. After vigorous protests, the mill was replaced as an emblem by the monkey.