The main reason for the higher-than-expected growth was strong exports, helped by a weaker euro.
The eurozone economy grew by 1% during the quarter.
Separate figures showed that the French economy grew by 0.6% in the quarter.
This compares with growth of 0.2% in the first three months of the year, INSEE said.
Not since the Berlin Wall divided the country has Germany seen growth of 2.2% in a single three-month period.
The German statistics agency says the numbers can partly be explained by a sustained period of export growth, as Germany's immense manufacturing sector begins to recover the markets it lost in 2009.
But the most surprising element of the numbers is an apparent contribution from the German consumer. They have traditionally been very cautious in their spending habits, but appear in 2010 to have finally opened their wallets with gusto.
France's figure of 0.6% growth in the period from April to June is also significantly better than economists had expected, raising hopes that Europe may be emerging from the gloom of the last three months, a period when many contemplated the end of the euro currency as rioters took to the streets of Athens.
Meanwhile, the Spanish economy grew by 0.2% in the second quarter, compared with growth of 0.1% in the previous three months, its National Statistics Institute said.
Growth figures for the rest of the eurozone will be published later.'Rapid recovery'
Destatis also revised up the German growth figure for the first three months of the year, to 0.5% from 0.2%.
As well as the "strong contribution" from exports, the office said household and government spending also helped to boost growth in the second quarter.
"The German economy is recovering rapidly," Destatis said.
Analysts had expected strong growth of about 1% to 1.5%.
"The strong second quarter performance of the German economy is impressive but not surprising," said Carsten Brzeski at ING Financial Markets.
"The German economy mainly benefited from two factors - a catching up in the construction sector after the harsh winter and strong foreign demand for German goods."
Despite the strong figures, economists do not expect the German economy to continue growing at such a fast pace.
"Looking ahead, it is almost needless to say that the current growth momentum is hardly sustainable in the coming months. With the one-off impact from the construction sector and normalising of export growth, German growth will return to more ordinary numbers," Mr Brzeski said.
The German Economy Minister, Rainer Bruederle, said the latest quarterly GDP figures "make growth of well above 2% possible for 2010".
The quarterly GDP figures from Germany, France and Spain show that the economic recovery in Europe gained pace between April and June. The UK also reported higher-than-expected growth of 1.1% for the period.
In the US, however, annualised growth for the quarter fell to 2.4% from 3.7% in the first three months of the year, raising questions about the strength of the recovery in the world's biggest economy. BBC