The quarterly contraction in the April-to-June period was the largest since 1955 when the agency began to keep quarterly records.
Gross domestic product (GDP) fell by 2.2 per cent in the first quarter, the ONS said.
It was the first time Britain was in recession, defined as two quarters of contraction in a row, since 2009.
The British economy's decline was about twice as large as the falls recently reported by Germany, France or the United States.
"I've said before that hard times were coming, and today's figures show that hard times are here," Chancellor of the Exchequer Rishi Sunak said.
"Hundreds of thousands of people have already lost their jobs, and sadly many more will," he told Sky News.
"But I will say to people although tough decisions lie ahead for all of us, no one will be left without hope or opportunity," Sunak said.
Anneliese Dodds, shadow chancellor for the main opposition Labour party, said the fall was "a tragedy".
"We've already got the worst excess death rate in Europe - now we're on course for the worst recession too," she tweeted.
"That's a tragedy for our country and it's happening on the [prime minister's] watch. A downturn was inevitable after lockdown - [Boris] Johnson's jobs crisis wasn't."
The ONS said there were signs of improvement in June as government restrictions on movement began to ease.
"The economy began to bounce back in June, with shops reopening, factories beginning to ramp up production and house-building continuing to recover," said Jonathan Athow, deputy national statistician at the ONS.
Services, production and construction output saw record quarterly falls in the second quarter, the agency said, noting "those industries ... have been most exposed to government restrictions."
Private consumption was down by over a quarter and government consumption also dropped.
Samuel Tombs, chief Britain economist at Pantheon Macroeconomics consultancy, tweeted that the "government's failure to lock down early and then to stamp out Covid-19 quickly ranks as one of the biggest macroeconomic policy blunders in modern times. We've all paid a hefty price."
Gross domestic product (GDP) fell by 2.2 per cent in the first quarter, the ONS said.
It was the first time Britain was in recession, defined as two quarters of contraction in a row, since 2009.
The British economy's decline was about twice as large as the falls recently reported by Germany, France or the United States.
"I've said before that hard times were coming, and today's figures show that hard times are here," Chancellor of the Exchequer Rishi Sunak said.
"Hundreds of thousands of people have already lost their jobs, and sadly many more will," he told Sky News.
"But I will say to people although tough decisions lie ahead for all of us, no one will be left without hope or opportunity," Sunak said.
Anneliese Dodds, shadow chancellor for the main opposition Labour party, said the fall was "a tragedy".
"We've already got the worst excess death rate in Europe - now we're on course for the worst recession too," she tweeted.
"That's a tragedy for our country and it's happening on the [prime minister's] watch. A downturn was inevitable after lockdown - [Boris] Johnson's jobs crisis wasn't."
The ONS said there were signs of improvement in June as government restrictions on movement began to ease.
"The economy began to bounce back in June, with shops reopening, factories beginning to ramp up production and house-building continuing to recover," said Jonathan Athow, deputy national statistician at the ONS.
Services, production and construction output saw record quarterly falls in the second quarter, the agency said, noting "those industries ... have been most exposed to government restrictions."
Private consumption was down by over a quarter and government consumption also dropped.
Samuel Tombs, chief Britain economist at Pantheon Macroeconomics consultancy, tweeted that the "government's failure to lock down early and then to stamp out Covid-19 quickly ranks as one of the biggest macroeconomic policy blunders in modern times. We've all paid a hefty price."