Documents released by the National Archives show that rum, sodomy and the lash would have been easily endured compared with what 19th-century sailors actually suffered

It wasn't so much rum, sodomy and the lash the men had to fear in the navy 200 years ago, as the ship's surgeon heading towards them with a reassuring smile, a saw in one hand and a poison bottle in the other.

Brandy enemas, a strychnine injection, a sulphuric acid gargle, ammonia rubbed on the lips, and three and a half pints of blood taken from a man with pneumonia are all recorded as attempted cures in a century of gruesome and fascinating journals of Royal Navy ship surgeons revealed at the National Archives: all failed.

The surgeons on battleships, hospitals, shore parties and emigrant and convict transports were required to keep journals as they battled yellow fever, dysentery, malaria, pregnancy among female convicts, tarantula bites from excursions on shore and limbs mangled by enemy action or clumsiness on deck.

Many were accomplished amateur artists and illustrated their journals with an unpleasant vividness, including the syphilitic eyeball of one Christopher Walters and the surprising news that after 16 days' treatment with an ammonia eyewash, he was "well".

The journals cover one of the navy's most famous ships on its most famous day – but with a startling omission.

Irishman William Beatty was the surgeon on HMS Victory, and on the day of the Battle of Trafalgar (21 October 1805) recorded treating scores of sailors and soldiers, stitching and amputating limbs half torn off by flying splinters of wood, or musket-shot wounds from the French sharpshooters.

He does not mention that the surgeon from a smaller ship not directly involved in the battle rowed over to help, nor does he mention one particular musket-shot victim: Admiral Lord Nelson, who would survive his grievous injuries just long enough to learn that the battle was won.

Despite the gap in the journal, Nelson proved a nice little earner for Beatty. Back in civilian life he published a detailed account of the injuries, treatment and death of Nelson which became a bestseller.

William Howell, who had been a boatswain at Trafalgar and a sergeant at Waterloo, turns up in the journals years later, aged 55, on the Dryad, described as "very much dissipated and suffered much from stricture and perineal tumours".

On the convict ship Elizabeth, on 15 June 1825, the surgeon, P Power, had a problem with worms – or rather an unfortunate 12-year-old girl, Ellen McCarthy, whose complaints included "abdomen hard and swollen, picks her nose, starts in her sleep, bowels constipated, pirexia [fever], tongue foul, pulse quick, skin hot, great thirst".

He gave her some medicine – his notes are so contracted that even the experts in the archives cannot decipher his prescription – and admitted her to the sick bay.

The following day her mother brought Power a "lumbricus", a worm, "87 inches [2.2 metres] long which the patient vomited: the medicine operated well".

On the Juliana, surgeon Henry Kelsall worried about convicts lying in soaked bedding after the deck above leaked during fierce storms.

It proved difficult to get the miserable prisoners to move so their quarters could be cleaned: the only way was "by closing the hatches and smoking them up with fumes of sulphur, cayenne pepper etc".

Sailors were shattered in battle and in peace caught fevers, skin infections and venereal diseases. But they also fell victim to more exotic problems: one man suffered "a smart pain in walking", undoubtedly caused by the 19 penknives and one penknife case he proved to have swallowed.

James Connor, a boatswain's mate on the Dryad, was painfully afflicted at Naples in 1829. "In the act of playing tricks upon one of his messmates" – no further details are given – "his penis was slit with a knife at about an inch wounding the glans to a line in depth".

The Dryad also carried poor young Samuel Tapper, whose life must have been made a misery. Assistant surgeon John Irving recorded he was often asked to observe him bathe.

"Tapper's breasts so perfectly resemble those of a young woman of 18 to 19 that even the male genitals which are also perfect do not fully remove the impression that the spectator is looking on a female." Tapper was minutely examined, and his breasts found "not at all resembling the fat mammille of boys".

Irving added: "I have been chiefly moved to notice this case having lately seen in the Royal Gallery at Florence the statue of an Hermaphrodite, (so called) perfectly resembling Tapper, in breasts and genitals."

In Barbados Mr Ody, master mate of the Arab, was poisoned by eating "a Mangereen apple", causing "severe vomiting and violent convulsions, I poured down a good quantity of sweet oil, applied the warm bath, gave him a calomel purge & the next morning he brought away a considerable quantity of blood and skins of the stomach being corroded by the virulence of the fruit".

Thomas Sapper then administered "sago and a strong solution of barley and ising" and Ody recovered slightly, but the surgeon gloomily concluded: "The effect of this poison is never properly iradicated."

Even calomel and sago couldn't help three men struck by lighting on the same ship in October 1799. The three died after the lightning bolt shattered the main top mast "which acted as its conductor and issued a most sulphureous stench", and "every man on deck knocked down, many of whom cried out their leg or arm were broke from the violence of the shock". The sailor at the very top of the shattered mast survived without a scorched hair.

The period covered by the 1,000 journals, from 1793 to 1880, was a time when surgeons fought most diseases figuratively in the dark, unaware of their own ignorance.

They tried to make sense of what they saw by recording variations of climate and temperature, speculating that yellow fever was caused by "vapours" from "rains mingling with the filth of the huts of the black population" and "decomposing and putrid animals and vegetable matter".

Until antisepsis and antibiotics came, the doctors were usually fighting a losing battle. One surgeon recorded the local treatment for the sores of yaws was to scrub until they bled freely before rubbing lime into them, at which "the strongest men have shrieked and yelled and even wept like children".

A rare breakthrough was the realisation that vitamin C could prevent scurvy. Surgeon George Ogden, on the Barossa, left appalling watercolours of the condition at its worst, an unfortunate man called Edwards shown with his inside leg raw from groin to ankle and the rest of his skin spattered with lumps which were, the surgeon noted carefully, "the size of a grain of Scotch barley".

Bruno Pappalardo, director of the project, says the journals are not just of interest to naval historians. "They are arguably the most valuable collection of records for the study of health and medicine – at sea or anywhere else – of the 19th century."

He is struck by the humanity of many of the surgeons, and the fact that more of the crews and convicts under their care survived than civilian sailors and free passengers making similar voyages.

The original catalogues for the journals just gave ship names and dates. The archives were awarded a major grant from the Wellcome Trust to digitise many of the journals, and expand the catalogue so that from today they can also be searched online by the names of the crew or passengers, or even the medical conditions treated.

Colin Williams, one of the researchers who spent 18 months poring over thousands of fading handwritten pages, said: "There were times when it really got to me, and I just had to go and have a walk in the fresh air: so much suffering."