On 17 April 1813, John McLean, a sailor on board the Royal Navy flag ship died after spending ten days drinking gin and rum. The alcohol-fuelled death, drove a despairing William Warner, the ship’s surgeon, to observe in his notes: “Drunkenness nowadays in the Navy kills more men than the sword.”

The extent to which Britannia ruled the waves with warships crewed by sozzled seamen, along with accounts of the extraordinary range of ailments treated by naval medical officers as Britain set about building its empire, are revealed today in an archive of handwritten doctors’ journals which has lain largely unread for decades.

From treating a 12-year-old girl who vomited an 87-inch worm to one surgeon’s meticulous examination of the Royal Navy’s first hermaphrodite sailor, the cataloguing by the National Archives of more than 1,000 treatment diaries kept by ship’s surgeons reveals a new and often grisly side to the nature of life at sea between 1793 and 1880.

A two-year project funded by the Wellcome Trust at a cost of about £100,000 has produced the first detailed account of the contents of the documents, including the names of the patients and their complaints. Hitherto, the papers had been difficult to examine, not least because the handwriting of doctors in the 18th and 19th centuries was no less impenetrable than that of their modern successors.

The journals show how many medical officers embraced the spirit of scientific discovery of their age, cataloguing wildlife and drawing native tribesmen when not going about their official duties treating disease and illness with an arsenal of often antediluvian medications that relied heavily on alcohol (the favoured cure for a tarantula bite was to pour rum on the wound) and heavy metals (the sailor poisoned by a “mangereen apple” in Barbados was made to swallow a purgative made from mercury).

Some of the journals were painstakingly illustrated by medical officers who drew coloured pictures of some of the more exotic conditions they encountered along with images of the microbes they found under their microscopes and maps of the far-flung places they visited.

Bruno Pappalardo, naval records specialist at the National Archives in Kew, west London, said: “These were learned, educated men with a scientific background who were going around the world with a determination to record the things they saw, the patients they treated and be interested in the world around them. It may have been an at time harsh environment but their compassion shines through – they did their utmost to care for people. As such, their journals are probably the most significant collection of records for the study of health and medicine at sea for the 19th century.”

The files, which also include the records of ship’s surgeons on board vessels transporting convicts to Australia, provide a candid glimpse of the perilous nature of maritime life.

Daniel McNamara, the medical officer on board a convict ship in 1821, relates how a mutiny was averted only after a majority of the prisoners refused to take part in the insurrection planned by their guards. Elsewhere, there are accounts of an attack by a walrus on a hunting boat and how three sailors were killed by a lightning strike which “issued a most sulphureous [sic] stench accompanied with three sharp cracks”.

But the ocean-bound doctors frequently returned to the subject of the perils of drink on board vessels, lamenting the inebriated state of many of their patients. Thomas Simpson, sailing on board HMS Arethusa in 1805, highlighted the case of John Downie, a 26-year-old Royal Marine of “ghastly wretched appearance” who performed animal impressions in return for grog or rum from his shipmates.

Mr Simpson wrote: “He can imitate with the greatest possible exactness the howling of a pack of hounds, the crowing of a cock, the bellowing of a bull, cow or calf and a number of other animals. On account of these curious qualifications he is often solicited by his shipmates to give a specimen of talents and a glass of grog is of course his reward. I presume he has been drunk in consequence of something of this kind and has affected sickness to avoid punishment. He says his head aches.”

The files bear testimony to the inventiveness of naval surgeons when faced with seemingly irretrievable situations. When a sailor fell overboard from the HMS Princess Royal in 1802 and spent nine minutes under the water, the vessel’s surgeon decided to attempt to revive the apparently lifeless corpse by blowing tobacco smoke into the lung of the stricken seaman. After ten minutes of administering the ad hoc treatment, the patient coughed, sighed and was soon well enough to walk around the sick bay.

Other treatments proved less productive. In another case, a surgeon submitted another patient to a brandy enema before injecting him with strychnine, which was used at the time in small doses as a stimulant. Sadly neither had a noticeable effect and the patient was declared dead.