Sloane was born on 16 April 1660 at Killyleagh in County Down, in the colonial Protestant Plantation of Ulster in the North of Ireland. He was the seventh son of Alexander Sloane (died 1666), agent for James Hamilton, second Viscount Claneboye and later first Earl of Clanbrassil. Sloane's family had migrated from Ayrshire in Scotland, but settled in the north of Ireland under James I. His father died when he was six years old.
As a youth, Sloane collected objects of natural history and other curiosities. This led him to the study of medicine, which he went to London, where he studied botany, materia medica, surgery and pharmacy. His collecting habits made him useful to John Ray and Robert Boyle. After four years in London he travelled through France, spending some time at Paris and Montpellier, and stayed long enough at the University of Orange-Nassau to take his MD degree there in 1683. He returned to London with a considerable collection of plants and other curiosities, of which the former were sent to Ray and utilised by him for his History of Plants.
Sloane was elected to the Royal Society in 1685. At the same time attracted the notice of Thomas Sydenham, who gave him valuable introductions to practice. In 1687, he became a fellow of the College of Physicians, and the same year went to Jamaica aboard HMS Assistance as physician in the suite of the new Governor of Jamaica, the second Duke of Albemarle. Jamaica was fast emerging as a source of immense profit to British merchants based on the cultivation of sugar and other crops by the forced labor of imported African slaves.
However, Albemarle died in Jamaica the next year, so that Sloane's visit lasted only fifteen months; during that time he noted about 800 new species of plants, which he catalogued in Latin in 1696; he later wrote of his visit in two lavishly illustrated folio volumes (1707 – 1725). He became secretary to the Royal Society in 1693, and edited the Philosophical Transactions of the Royal Society for twenty years.
Sloane married Elizabeth Langley Rose, the widow of Fulke Rose of Jamaica, and daughter of alderman John Langley. They had three daughters, Mary, Sarah and Elizabeth. They also had one son, Hans. Of the four children only Sarah and Elizabeth survived infancy. Sarah married George Stanley of Paultons and Elizabeth married Charles Cadogan, the future Second Baron Cadogan. Income from the sugar produced by enslaved African laborers on Elizabeth's plantations at an area known as Sixteen Mile Walk fed the family fortunes in London and, together with Sloane's medical revenue and London property investments, gave him the wealth to collect on a vast scale.
Sloane encountered cacao while he was in Jamaica, where the locals drank it mixed with water, though he is reported to have found it nauseating. Many recipes for mixing chocolate with spice, eggs, sugar and milk were in circulation by the seventeenth century. After returning from Jamaica, Sloane may have devised his own recipe for mixing chocolate with milk, though if so, he was not the first. By the 1750s, a Soho grocer named Nicholas Sanders claimed to be selling Sloane's recipe as a medicinal elixir, perhaps making 'Sir Hans Sloane's Milk Chocolate' the first brand-name milk chocolate. By the nineteenth century, the Cadbury Brothers sold tins of drinking chocolate whose trade cards also invoked Sloane's recipe.
His practice as a physician among the upper classes was large, fashionable and lucrative. He served three successive sovereigns, Queen Anne, George I and George II. In the pamphlets written concerning the sale by William Cockburn of his secret remedy for dysentery and other fluxes, it was stated for the defence that Sloane himself did not disdain the same kind of professional conduct; and some colour is given to that charge by the fact that his only medical publication, an Account of a Medicine for Soreness, Weakness and other Distempers of the Eyes (London, 1745) was not given to the world until its author was in his eighty-fifth year and had retired from practice.
In 1716, Sloane was created a baronet, making him the first medical practitioner to receive a hereditary title. In 1719 he became president of the Royal College of Physicians, holding the office for sixteen years. In 1722, he was appointed physician-general to the army, and in 1727 first physician to George II. In 1727 he succeeded Sir Isaac Newton as president of the Royal Society; he retired from it at the age of eighty. He was a founding governor of London's Foundling Hospital, the nation's first institution to care for abandoned children.
Sloane's fame is based on his judicious investments rather than what he contributed to the subject of natural science or even of his own profession. His purchase of the manor of Chelsea, London in 1712, provided the grounds for the Chelsea Physic Garden. His great stroke as a collector was to acquire in 1701 (by bequest, conditional on paying of certain debts) the cabinet of William Courten, who had made collecting the business of his life.
When Sloane retired in 1741, his library and cabinet of curiosities, which he took with him from Bloomsbury to his house in Chelsea, had grown to be of unique value. He had acquired the extensive natural history collections of William Courten, Cardinal Filippo Antonio Gualterio, James Petiver, Nehemiah Grew, Leonard Plukenet, the Duchess of Beaufort, the rev. Adam Buddle, Paul Hermann, Franz Kiggelaer and Herman Boerhaave. On his death on 11 January 1753 he bequeathed his books, manuscripts, prints, drawings, flora, fauna, medals, coins, seals, cameos and other curiosities to the nation, on condition that parliament should pay his executors £20,000, far less than the value of the collection. The bequest was accepted on those terms by an act passed the same year, and the collection, together with George II's royal library, etc., was opened to the public at Bloomsbury as the British Museum in 1759. A significant proportion of this collection was later to become the foundation for the Natural History Museum.
He also gave the Apothecaries' Company the land of the Chelsea physic garden, which they had rented from the Chelsea estate since 1673.
Hans Sloane was buried on 18 January 1753 at Chelsea Old Church with the following memorial:
"To the memory of Sir Hans Sloane, Bart, President of the Royal Society, and of the College of Physicians; who in the year of our Lord 1753, the 92d of his age, without the least pain of body and with a conscious serenity of mind, ended a virtuous and beneficent life. This monument was erected by his two daughters Eliza Cadogan and Sarah Stanley"
His grave is shared with his wife Elisabeth who died in 1724. Sloane Square, Sloane Street and Sloane Gardens in the Royal Borough of Kensington and Chelsea are named after Sir Hans as is the moth Urania sloanus. His first name is given to Hans Street, Hans Crescent, Hans Place and Hans Road, all of which are also situated in the Royal Borough. Carl Linnaeus named the plant genus Sloanea after him.