Beatty, Sir William (1773–1842), naval surgeon, was born in the Waterside district of Derry, the eldest of four sons and two daughters of James Beatty, excise gauger, and his wife, Anne (née Smyth). Nothing is known about William's early life but he presumably attended a local grammar school and was then apprenticed to his uncle, George Smyth, a naval surgeon. On 5 May 1791 Beatty was examined before the London Company of Surgeons and qualified for naval service in his turn. For the next ten years he was almost permanently at sea, serving as a surgeon on frigates in the West Indies and the Atlantic approaches during the war with France that broke out in 1793. In October 1801, as the war subsided, Beatty was placed on half-pay, but in July 1803, when hostilities recommenced, he was commissioned to the 74-gun Spencer, a line-of-battle ship. Her commander was the Irishman Robert Stopford, son of Lord Courtown. For the next eighteen months Beatty served with Stopford as part of Nelson's Mediterranean squadron, then in December 1805 he transferred to the Victory, whose surgeon, George Magrath (1775–1857), another Ulsterman, had been appointed to the hospital at Gibraltar.
Beatty remained with the Victory until she was decommissioned in January 1806. Trafalgar was his first and only naval engagement of any consequence. He and his two assistants behaved heroically. In the course of the afternoon of 21 October 1805, in the cramped and ill-lit operating theatre on the orlop deck below the waterline, they successfully treated over 100 officers and men, and performed eleven amputations; Lord Nelson, the most illustrious casualty of the action, was beyond medical help. After the battle Beatty instructed that the dead admiral's body be placed in a barrel of brandy so that it could be preserved until the Victory reached England. Once in Portsmouth, on 11 December, he had the barrel opened, took out the body, and performed a rapid autopsy. He attended Nelson's funeral at St Paul's cathedral on 9 January 1806, then at the end of the month was posted to the Sussex, a hospital ship lying off Sheerness. During the summer of 1806 he penned his personal account of Nelson's agony. Initially intended to be part of the official biography of the admiral, then being compiled under the patronage of the prince of Wales, it was eventually printed separately, under the title An authentic narrative of the death of Lord Nelson, in January 1807. If Beatty thereby hoped to make his name by capitalising on the public's insatiable appetite for information about Nelson's last moments, he succeeded. Although there is reason to suspect that the account was embellished for literary effect, and that even the famous last words ‘Thank God I have done my duty’ were apocryphal, Beatty's narrative was immediately accepted as gospel and has remained so ever since. For the rest of his life Beatty was a celebrity.
Even before the publication of the Authentic narrative, Beatty's naval career had taken off. On 25 September 1806 he was made, at the age of thirty-three, physician to the Channel fleet, one of the plum positions in the naval medical service. Based in Plymouth, he held the post until August 1815, when, the French war being finally over, he went on half-pay. He had already begun to prepare for retirement by having himself made a fellow of the Royal College of Physicians of Edinburgh in 1814 on the strength of a medical degree from Aberdeen, gained in absentia in February 1806. He then went north to Scotland, where he spent the next two years honing his medical knowledge in the Edinburgh medical faculty. He did not set up his plate in the city, but on 14 October 1817 took a second MD in absentia at St Andrews, and on 22 December became a licentiate of the Royal College of Physicians of London. Nor in the end did he establish himself in the capital but returned to Plymouth, where he lived for the next five years. During this time, he became part of the country's scientific establishment. On 7 April 1818 he was elected a fellow of the Linnean Society of London, and a week later a fellow of the Royal Society.
In 1822 Beatty was recalled to the naval medical service as physician to Greenwich Hospital: he ran the medical department there for seventeen years. Once based in London, he became a pillar of the community. Only a few years after taking up his appointment he became one of the directors of the newly founded Clerical Medical and General Life Assurance Company. Physician extraordinary to the duke of Clarence, later William IV, he was knighted in 1831. At the beginning of the 1830s he also joined the board of the capital's first railway company, the London and Greenwich. Finally, in March 1838, he was asked to join the organising committee set up to oversee the construction of Nelson's column. He never lived to see the monument completed. After retiring in July 1839, he took a house in London's York Street, south of the Marylebone Road, where he died a few years later on 25 March 1842. He was buried at Kensal Green cemetery.
Beatty never married. Although he was a collector of manuscripts and books in later life, he left no papers of any substance. A handful of letters to Lady Hamilton are in the Wellcome Library, London (MS 6242), and part of his letter book while physician to the Channel fleet is in the library of the Royal Naval Museum, Portsmouth (MS 418/88). The only authenticated portrait is by Arthur William Devis (c.1806) in the collection of the National Maritime Museum, London.