Nearly 10 attacks were made on migrants in Germany every day in 2016, the country's interior ministry says.
A total of 560 people were injured in the violence, including 43 children.
Three-quarters of the attacks targeted migrants outside of their accommodation, while nearly 1000 attacks were on housing.
Chancellor Angela Merkel's decision to open up Germany to people fleeing conflict and persecution has polarised the country and boosted hate crime.
Germany is struggling with a backlog of asylum applications and there are fears about security following a series of terrorist attacks across Europe.
But the number of asylum seekers arriving in Germany in 2016 was 280,000, a drop of more than 600,000 from the previous year, following the closure of the Balkan migrant route and a European Union deal with Turkey.
The issue is expected to feature heavily in parliamentary elections this September.
Sunday's interior ministry figures, which are preliminary, were released in response to a parliamentary question.
There was no comparison with previous years because attacks against individual migrants only started to be counted as a separate category in 2016.
The attacks included an incident in January 2016 when a live grenade was thrown at a hostel housing 170 people in the south-western town in Villingen-Schwenningen. It failed to detonate.
In February this year, politicians from the far-right NPD were jailed for eight years for burning down a sports hall to be used to house migrants in Nauen, west of Berlin, in August 2015.
In a statement, the interior ministry said it strongly condemned the violence.
"People who have fled their home country and seek protection in Germany have the right to expect safe shelter," the statement read.
MP Ulla Jelpke from the leftist Die Linke party said that the government was too focused on a perceived security threat from migrants while the real threat was coming from the far right.
"Do people have to die before the rightwing violence is considered a central domestic security problem and makes it to the top of the national policy agenda?" she said, quoted by the Funke media group.
"Nazis are threatening refugees and therefore our democracy."
The interior ministry figures included:
- 3533 attacks on migrants and asylum hostels
- 2545 attacks on individual migrants
- 560 people injured, including 43 children
- 988 attacks on housing (slightly fewer than in 2015)
- 217 attacks on refugee organisations and volunteers