The University of Oxford’s famous Botanic Garden is to produce its own brand of gin.

Distilled from barley grains grown by medieval farmers, “Physic Gin” is flavoured with 25 different botanicals that were first planted after the garden was founded in 1621.

The official Oxford gin – believed to be the first time a university has gone into the commercial spirits business – is a collaboration between Professor Simon Hiscock, the director of the Botanic Garden, and the Oxford Artisan Distillery.

Flavourings of wormwood, Szechuan pepper, opium poppy seed, calamus root and gentian root are all grown in the garden – a favourite haunt of JRR Tolkien and Lewis Carroll – although a few of the ingredients are sourced from elsewhere.

“We don’t really have the capacity to grow enough juniper berries on the scale required,” Hiscock said. “But the majority of the plants are on the original list drawn up by Bobart.”

“Bobart” is Jacob Bobart the Elder, the first keeper of the garden, who published a catalogue in 1648 of the 1,600 plants in it. The German, a former mercenary, sold fruit and vegetables from the garden during the English civil war, and also ran a pub, the Greyhound.

“There’s no record of him distilling gin, but pubs in those days usually brewed their own beer,” said Hiscock, who has never been a mercenary but is the first horti praefectus since Bobart to hold a licence to sell alcohol.

Hiscock has supplied the botanicals; Tom Nicolson at the distillery is responsible for the grains, which have an equally interesting history.

Most of the distillers that have sprung up since the gin craze began a few years ago buy in their alcohol – known as grain neutral spirit – from third parties. Physic Gin comes from barley grown by John Letts, an “archaeological botanist”, as Nicolson describes him. Letts has collected grains from the bases of thatched roofs in Oxfordshire, and turned them into several tonnes of hand-scythed, machine-threshed barley.

“Some of his grains are from the 1200s, but he’s managed to collect quite a lot from the 15th and 16th centuries,” Nicolson said. “They grow five or six feet tall, so they grow higher than the weeds and form a canopy of grain over the weeds.” The fields contain about 250 varieties of grain, Nicolson said, which creates a natural defence against drought and pests: “Nothing affects the whole crop.”

The alcohol is fermented in huge brass stills and overseen by master distiller Cory Mason. “Most distilleries don’t make their spirits from scratch,” Hiscock said. “Using these ancient grains is improving biodiversity and that’s an issue close to our hearts.”