A record interest bill drove the budget deficit up to £22.9bn ($27.4bn) last month, the second highest June since records began in 1993.
The Office for National Statistics (ONS) said that borrowing was £4.1bn higher in June than the same month a year before. It also overshot the Office for Budget Responsibility (OBR) forecast by £600m.
Debt interest payments, which are being pushed up by inflation on the huge stock of index-linked government bonds, hit an all-time high of £19.4bn in worse-than-expected figures. That's more than double the previous monthly record.
Read more: World's most powerful passports revealed
A quarter of the UK’s government debt is index-linked, so the cost of servicing it is pushed up by inflation, which is running at a 40-year high.
The UK fiscal watchdog had forecast interest payments would rise to £19.7bn in June — slightly more than the actual figure — before dropping back to £3.9bn in July.
The worsening UK public finance figures make it harder for the new chancellor, and any new prime minister, to cut taxes to ease the cost of living squeeze.
Chancellor Nadhim Zahawi, responding to the latest figures for government borrowing from the ONS, said: “We recognise that there are risks to the public finances including from inflation, with debt interest costs in June more than double the previous monthly record.
“That’s why the government has taken action to strengthen the public finances, and in their latest forecast the OBR assessed that we are on track to get debt down.”
Central government’s day-to-day spending jumped by £9bn, to a total of £86bn over in the one-month period.
"This may limit the ability of the next prime minister to provide more relief for households when a further rise in inflation from 9.4% in June to around 12% in October worsens the cost of living crisis," said Ruth Gregory, senior UK economist at Capital Economics, a consultancy.
Danni Hewson, AJ Bell financial analyst, said: "Families wondering why the government isn’t doing more to help them deal with their strained finances need to understand that the treasury’s fighting its own battle with inflation.
"The debt interest paid out last month was the highest figure since records began in 1997 and with inflation still running hot things are only going to get more expensive particularly as some of that debt rolls over and refinancing is going be substantially more expensive.
"At the moment inflation is playing a dual role because it’s also boosting the government’s tax take. When things cost more people have to pay more in taxes like VAT, but it also means the government is having to pay more and the bill for things like wages is going up.
"And of course, if people don’t have money to spend, they simply won’t buy stuff and that will bring its own consequences.
"At the moment fiscal policy demands an ability to balance on a tight rope, spend too much and debt becomes insurmountable spend too little and the economy will simply grind to a halt."
Isabel Stockton, research economist at IFS, said: “New figures out today show the government’s debt interest bill climbed to nearly £20bn just in the month of June. But this seemingly large big jump is only temporary and partly reflects a seasonal pattern: debt interest is high in June of every year due to accounting quirks, and it will drop substantially in July.
"Nevertheless, debt interest will be much higher than we have become used to across the whole of this year due to sharply rising inflation and rising interest rates. Much more important than the size of this month’s, or even this year’s, debt interest spending spike is whether inflation will quickly and sustainably return to target. If it does, debt interest will start to fall quickly in response.”