The condition known today as diabetes (usually referring to diabetes mellitus) is thought to have been described in the Ebers Papyrus (). Ayurvedic physicians (5th/6th century BC) first noted the sweet taste of diabetic urine, and called the condition madhumeha ("honey urine"). The term diabetes traces back to Demetrius of Apamea (1st century BC). For a long time, the condition was described and treated in traditional Chinese medicine as (; "wasting-thirst"). Physicians of the medieval Islamic world, including Avicenna, have also written on diabetes. Early accounts often referred to diabetes as a disease of the kidneys. In 1674, Thomas Willis suggested that diabetes may be a disease of the blood. Johann Peter Frank is credited with distinguishing diabetes mellitus and diabetes insipidus in 1794.

In regard to diabetes mellitus, Joseph von Mering and Oskar Minkowski are commonly credited with the formal discovery (1889) of a role for the pancreas in causing the condition. In 1893, Édouard Laguesse suggested that the islet cells of the pancreas, described as "little heaps of cells" by Paul Langerhans in 1869, might play a regulatory role in digestion. These cells were named islets of Langerhans after the original discoverer. In the beginning of the 20th century, physicians hypothesized that the islets secrete a substance (named "insulin") that metabolises carbohydrates. The first to isolate the extract used, called insulin, was Nicolae Paulescu. In 1916, he succeeded in developing an aqueous pancreatic extract which, when injected into a diabetic dog, proved to have a normalizing effect on blood sugar levels. Then, while Paulescu served in army, during World War I, the discovery and purification of insulin for clinical use in 1921–1922 was achieved by a group of researchers in Toronto—Frederick Banting, John Macleod, Charles Best, and James Collip—paved the way for treatment. The patent for insulin was assigned to the University of Toronto in 1923 for a symbolic dollar to keep treatment accessible.

In regard to diabetes insipidus, treatment became available before the causes of the disease were clarified. The discovery of an antidiuretic substance extracted from the pituitary gland by researchers in Italy (A. Farini and B. Ceccaroni) and Germany (R. Von den Velden) in 1913 paved the way for treatment. By the 1920s, accumulated findings defined diabetes insipidus as a disorder of the pituitary. The main question now became whether the cause of diabetes insipidus lay in the pituitary gland or the hypothalamus, given their intimate connection. In 1954, Berta and Ernst Scharrer concluded that the hormones were produced by the nuclei of cells in the hypothalamus.

Early accounts

Ancient Egypt ()

The Ebers Papyrus is among the oldest and most important medical papyri of Ancient Egypt. Written , it was likely copied from a series of much earlier texts, and contains a passage from the First Dynasty (). The document is named after Georg Ebers, who purchased the document in 1872 in the city of Luxor, the site of Thebes (known to Ancient Egyptians as Waset). Thebes was the most venerated city of Ancient Egypt in its heyday during the Middle Kingdom and New Kingdom.

The Ebers Papyrus is thought to contain the first known medical reference to diabetes, by the phrase: "...to eliminate urine which is too asha". The crucial word asha can mean both "plentiful" and "often". It is unclear whether the condition described was excessive urine (polyuria), which may have been symptomatic of diabetes, or increased frequency of urine, very often due to urinary tract infection.

The following mixture was prescribed for treatment: "A measuring glass filled with Water from the Bird pond, Elderberry, Fibres of the asit plant, Fresh Milk, Beer-Swill, Flower of the Cucumber, and Green Dates". Urinary troubles in the adult were also corrected with "rectal injections of olive oil, honey, sweet beer, sea salt, and seeds of the wonderfruit".

Ayurveda (5th/6th century BC) Ayurveda is a Hindu system of medicine with historic roots in the Indian subcontinent. Some of its conceptual origins trace back to the Indus Valley civilisation. It developed significantly through the Vedic period.

Polyuria in diabetes was associated with a sweet taste of urine in Sanskrit texts of the 5th/6th century BC, at the time of two notable physicians Sushruta and Charaka. They described several diseases of polyuric nature collectively called Prameha ("to flow"). Included in this group of ailments was the equivalent of diabetes mellitus, madhumeha ("honey urine"), named as such because the sweet urine of patients would attract ants and flies. These patients are said to have suffered from extreme thirst and foul breath.

Ayurvedic texts provided dietary prescriptions for the condition. They constitute the earliest known references to the presence of sugar in the urine (glycosuria) and to dietary remedies, at least a thousand years before modern European descriptions began to more comprehensively conceptualize the disease. Sushruta and Charaka also identified the two types of diabetes mellitus, later dubbed Type I and Type II diabetes.

Ancient China

Modern-day diabetes is associated with two terms in the Chinese language. The traditional term, (), means "wasting-thirst" and correlates closely with diabetes in most instances of historical description. The more modern term, (), means "sugar urine disease", and is equivalent to diabetes mellitus. It has been suggested that the modern term is derived from exchanges with Ayurvedic practitioners who called the condition madhumeha ("honey urine"). Within the Sinosphere (regions of East and Southeast Asia historically influenced by the linguistic and literary traditions of the Chinese empire), this etymology has also been borrowed into Korean ( []) and Japanese ( []).

Reviews of diabetology history in Traditional Chinese medicine have classified the diagnosis and treatment of () into four periods, summarized below. Classic texts provided a typology of the condition and outlined various recommendations on diagnosis, development, treatment, and prevention. Knowledge of wasting-thirst was integrated with knowledge of diabetes during the Qing dynasty.

The Yellow Emperor's Classic of Internal Medicine (475 BC – 8 AD) (), or The Yellow Emperor's Classic of Internal Medicine, is a fundamental ancient text in Chinese medicine and a major book of Daoist philosophy and lifestyle. It is generally dated to the late Warring States period (475–221 BC) and the Western Han dynasty (206 BC – 8 AD).

The text named the condition (; "wasting-thirst") and elaborated on it through 25 clauses. It recorded such symptoms as "three increases [excess] and one decrease [loss]": excessive thirst (polydypsia), excessive hunger (polyphagia), excessive urine (polyuria), and weight loss. Three sub-phases of xiāo kě were given, characterized by their dominant symptoms. These roughly correspond to the progressive stages of diabetes in modern-day Western medicine.

The Treatise on Cold Damage and Miscellaneous Diseases (9–280 AD)

(), or , is the first Chinese monograph on diseases by Zhang Zhongjing. The original work is lost, but most of its contents are preserved in two extant works called Shānghán Lùn (; "The Treatise on Cold Damage") and Jīnguì Yàolüè (; "Essential Prescriptions from the Golden Chamber"). The first work primarily addresses externally triggered conditions while the latter work describes internally generated conditions.

Zhang's specialized chapter on xiāo kě is found in Shānghán Lùn and Jīnguì Yàolüè. Nine subsections and nine formulae (herbal remedies) on wasting-thirst were recorded. The text proposed a theory of "three wasting-thirsts": upper- (associated with the lungs), middle- (associated with the stomach), and lower- (associated with the kidneys), all three of which shared excessive urine and thirst as symptoms. This theory was later expanded through the works of Liu Wansu (1120–1200 AD) and Wang Kentang (1549–1613 AD). According to Liu, "lower wasting-thirst" attributed to "kidney-yin deficiency" was associated with sweet urine (glycosuria). This may indicate differentiation akin to modern-day differentiation of diabetes mellitus and diabetes insipidus.

Extensive development of "wasting-thirst" (265–1368) The diagnosis and treatment of xiāo kě was expanded significantly through the Sui (581–618) and Tang (618–907) dynasties. Zeng Liyan (545–649) expounded on the diagnosis of modern-day diabetes mellitus through the presence of sugar in the urine (glycosuria). This characterization was echoed by other physicians in the centuries that followed. Notably, in (; "Medical Secrets of an Official") written in 752, Wang Tao (fl. 8th century AD) included a detailed case report of sweet urine and a summary of diabetology history before the Tang dynasty.

Sun Simiao (581–682 AD) further developed approaches to treatment, prevention, regulation, nursing, and convalescence. The formulae for wasting-thirst grew from one in The Yellow Emperor's Classic of Internal Medicine, to nine in Zhang Zhongjing's works, to 73 in Sun Simiao's. The selection of herbs grew from one (Eupatorium fortunei), to dozens used by Zhang, to over one hundred used by Sun.

Integration of Chinese and Western medicine (1368–1949) During the Ming (1368–1644) and Qing (1644–1912) dynasties, medical discoveries slowed but practitioners achieved significant knowledge integration across cultures. Over one hundred comprehensive medical monographs were cultivated, many synthesizing developments in the study of wasting-thirst and of diabetes.

Zhang Xichun (1860–1933), a renowned integrator of medical knowledge, produced (among other works) (; "The Integration of Traditional Chinese and Western Medicine"). In a dedicated chapter named " therapies", he discussed the following aspects synthesizing wasting-thirst and diabetes: nomenclature, theories (pathologies), primary formulae, medications (herbology and pharmacology), nursing (diet and maintenance), medical cases, and integrated analysis (protein and essence; qi and fluids).

Yu Yunxiu (1879–1954), a Japanese-educated practitioner of Western medicine aligned with the modernizer camp of the Chinese Ministry of Health, attempted to forbid the practice of Chinese medicine in 1929. In 1939, he wrote on the rough equivalence of wasting-thirst and diabetes.

Classical antiquity Greco-Roman accounts of what we now know as diabetes primarily describe excessive urination (polyuria). There is no known account of sweetness in early Greco-Roman concepts of the disease. Given the lasting legacy of classical medicine, these descriptions remained highly influential into the Middle Ages in Europe.

Greek writers It is assumed that the Hippocratic Corpus bears no direct mention of what we now know as diabetes. However, a number of indirect statements referring to excessive and "watery urine" suggest that Hippocratic writers may have been familiar with the condition. According to On Ancient Medicine, Hippocrates was under the impression that the slumbering and thirst which resulted from high blood sugar was due to the bowels struggling to digest too much food and the weaknesses resulting from low blood sugar were because the body lacked nourishment due to missing a meal.