The CPI measure of inflation rose in the 12 months to May to its highest level since March 1982.
Inflation is now almost five times higher than the Bank of England's target of two percent.
Economists are expecting UK inflation to hit 11 percent by the end of this year.
Today's increase is in line with what analysts had expected.
ONS chief economist Grant Fitzner said: “Though still at historically high levels, the annual inflation rate was little changed in May.
Britain's high street has been hit hard by inflation Andrew Matthews
Chancellor of the Exchequer Rishi Sunak says he knows 'people are worried' Oli Scarff
“Continued steep food price rises and record high petrol prices were offset by clothing costs rising by less than this time last year, and a drop in often fluctuating computer games prices.
“The price of goods leaving factories rose at their fastest rate in 45 years, driven by widespread food price rises, while the cost of raw materials leapt at their fastest rate on record.”
Responding, Chancellor of the Exchequer Rishi Sunak said: “I know people are worried about the rising cost of living, which is why we have taken targeted action to help families, getting £1,200 to the eight million most vulnerable households.
“We are using all the tools at our disposal to bring inflation down and combat rising prices, we can build a stronger economy through independent monetary policy, responsible fiscal policy which doesn’t add to inflationary pressures, and by boosting our long-term productivity and growth.”
UK inflation rate PA Graphics
But many disagree, pointing out that inflation is rising quicker than the rate of pay increases.
Mike Owens, UK Sales Trader at Saxo Markets, said:"Inflation has risen to its highest in 40 years today, hitting 9.1%, forcing the prices of everyday items up once again as the nation continues to battle a cost of living crisis.
"At a time when fuel has consistently hit record prices weekly and the costs of some foods have doubled on their mark-up in the past years, UK consumers will be waiting patiently for a string of Government packages to be released, starting in July.
"As a result of this morning's news, the pound has slipped -0.45% against the dollar and -0.1% vs the euro seeing the currency continue its downward trajectory in 2022.
"This is at a peak time for British holiday-goers trying to escape the blues in the UK, who are finding they're also losing out going abroad because of weaker exchange rates."
Miles Robinson, Chief Commercial Officer and expert at Haysto, said: "Inflation can sometimes be a positive thing when it comes to mortgages, as inflation can reduce the value of debt.
But this is only the case if your wages keep pace with inflation.
"What we are seeing now though is that wages are not increasing at the same rate as pay growth, with inflation overtaking any rise in pay."