Nearly 10 attacks were made on migrants in Germany every day in 2016, the 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 1,000 attacks were on housing.
Chancellor Angela Merkel's decision to open up Germany to people fleeing conflict and persecution has polarised opinion and been followed by an increase in 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.
The interior ministry figures
- 3,533 attacks on migrants and asylum hostels in 2016
- 2.545 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
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 an EU 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.
Attacks on asylum shelters and migrants
- December 2015 - 12 people injured after fires broke out at two hostels in Wasserstein, Bavaria
- January 2016 - Grenade thrown at hostel housing 170 people in the south-western town in Villingen-Schwenningen but fails to detonate. A court case subsequently heard that it was more likely the result of a dispute between security companies, rather than directed at asylum seekers
- February 2016 - Fire in Bautzen, eastern Germany, destroys roof of building planned to house migrants. Police say some onlookers cheered the fire and tried to prevent firefighters from extinguishing the blaze
- September 2016 - Residents clash with migrants in Bautzen
- February 2017 - Politician from the far-right NPD 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 its 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."
A note on terminology: The BBC uses the term migrant to refer to all people on the move who have yet to complete the legal process of claiming asylum. This group includes people fleeing war-torn countries such as Syria, who are likely to be granted refugee status, as well as people who are seeking jobs and better lives, who governments are likely to rule are economic migrants.
- 26 February 2017
- 9 February 2017
- 11 January 2017
- 28 December 2016
- 15 October 2016