Last year saw 400,000 more people settle in Germany than move away, migration data released by the Federal Statistical Office on Tuesday showed.
A total of 1.58 million people arrived from abroad, while 1.18 million people left the country.
Net migration to Germany thus fell slightly from 2017, when it had stood at 416,000 people.
The phenomenon can be attributed mostly to foreigners, with 87 per cent of those who moved to Germany holding a foreign passport, according to the statistical office.
A year earlier, it had been 89 per cent.
But the arrival of Germans who had previously lived abroad also increased.
In 2017, a total of 167,000 people returned to Germany, while the number reached 202,000 last year.
Even more Germans, however, emigrated: a total of 262,000, up from 249,000 in 2017.