The history of penicillin follows observations and discoveries of evidence of antibiotic activity of the mould Penicillium that led to the development of penicillins that became the first widely used antibiotics. Following the production of a relatively pure compound in 1942, penicillin was the first naturally-derived antibiotic.
Ancient societies used moulds to treat infections, and in the following centuries many people observed the inhibition of bacterial growth by moulds. While working at St Marys Hospital in London in 1928, Scottish physician Alexander Fleming was the first to experimentally determine that a Penicillium mould secretes an antibacterial substance, which he named "penicillin". The mould was found to be a variant of Penicillium notatum (now called Penicillium rubens), a contaminant of a bacterial culture in his laboratory. The work on penicillin at St Marys ended in 1929.
In 1939, a team of scientists at the Sir William Dunn School of Pathology at the University of Oxford, led by Howard Florey that included Edward Abraham, Ernst Chain,  Mary Ethel Florey, Norman Heatley and Margaret Jennings, began researching penicillin. They developed a method for cultivating the mould and extracting, purifying and storing penicillin from it, together with an assay for measuring its purity. They carried out experiments with animals to determine penicillin's safety and effectiveness before conducting clinical trials and field tests. They derived its chemical structure and determined how it works. The private sector and the United States Department of Agriculture located and produced new strains and developed mass production techniques. During the Second World War penicillin became an important part of the Allied war effort, saving thousands of lives. Alexander Fleming, Howard Florey and Ernst Chain shared the 1945 Nobel Prize in Physiology or Medicine for the discovery and development of penicillin.
After the end of the war in 1945, penicillin became widely available. Dorothy Hodgkin determined its chemical structure, for which she received the Nobel Prize in Chemistry in 1964. This led to the development of semisynthetic penicillins that were more potent and effective against a wider range of bacteria. The drug was synthesised in 1957, but cultivation of mould remains the primary means of production. It was discovered that adding penicillin to animal feed increased weight gain, improved feed-conversion efficiency, promoted more uniform growth and facilitated disease control. Agriculture became a major user of penicillin. Shortly after their discovery of penicillin, the Oxford team reported penicillin resistance in many bacteria. Research that aims to circumvent and understand the mechanisms of antibiotic resistance continues today.