The Federal Constitutional Court ruled that broadcaster ARD must air the advert by the right-wing extremist National Party of Germany (NPD) on free speech grounds.
After earlier court defeats for the NPD, it found there no firm evidence that the group's reworked TV spot was illegally inciting racial hatred, as claimed by ARD's Berlin regional broadcaster RBB.
SEE ALSO: Germany ends state funding for far-right NPD party
In its latest commercial, the NPD asserts that Germans had become "victims almost daily" because of the "uncontrolled mass immigration".
The NPD has seats in many town halls in Germany's ex-communist east but negligible poll ratings at the national level.
Since its founding in 1964, the party has not been able to win enough votes to cross the 5 percent threshold it needs for a seat in Germany's parliament.
Germany's upper house of parliament lost a bid in 2017 to ban the NPD, as
the Constitutional Court ruled the xenophobic fringe group was too insignificant to pose a real threat to the democratic order.
The right-wing Alternative for Germany (AfD) party, which has also railed against Chancellor Angela Merkel's decision to allow in more than one million asylum seekers during a 2015-16 influx, is polling around 10 percent ahead of the European Parliament elections.