The setback for the western city came as Germany is fighting a surging second wave of Covid-19, with new daily cases reaching record levels almost every other day.
Düsseldorf authorities on Wednesday ordered masks in public across the city, with the exception of parks and cemeteries, unless the possibility of encountering other people who are fewer than five metres (16 feet) away can be precluded.
In its ruling, the court called Düsseldorf's order confusing because it did not provide clarity on “which conduct is required” while at the same time threatening a fine in case of non-compliance.
City authorities said they would re-examine the wording of their mask order following the ruling.
Opposition to strict curbs including maintaining safe distances or limiting social contacts has been rising in Germany and elsewhere across Europe.
(article continues below)
See also on The Local:
A series of court cases favouring plaintiffs had last month toppled bans on hotel stays for domestic travellers from German districts with high prevalence
of the virus.
Thousands of demonstrators protesting the restrictions also ran riot in the eastern city of Leipzig on Saturday, flinging fireworks and other projectiles at police after they were told to disperse.
The violence shocked German leaders, sparking a hail of condemnation and questions over why the local court had even allowed the demonstration to proceed when it was clear that the protesters were unlikely to respect rules including on mask-wearing or maintaining a safe distance.
The Interior Ministry on Monday said that courts too need to act responsibly in the extraordinary situation thrown up by the pandemic.
“All authorities involved, including the courts, at this moment have a great responsibility in this exceptional situation and must make decisions in a way that they can be realistically implemented,” warned Interior Ministry spokesman Steve Alter.