The ban will be in place from Monday after the district court in The Hague rejected a petition by a body representing vendors of the hallucinogenic fungi to halt a health ministry ban on their cultivation and sale.
The ruling comes days after authorities ordered dozens of Amsterdam's famous cannabis-selling coffee shops to close and two other municipalities announced they would close down all their cannabis cafes from February.
"This is bad news for us," Paul van Oyen, a spokesman for the vendors' association VLOS told AFP after the verdict. "We are highly disappointed."
The district court dismissed the VLOS's petition for an urgent interdict against the ban as groundless and unfair.
The ban, introduced by Health Minister Ab Klink and already passed by lawmakers, will now come into force on December 1.
The legislation forbids both the cultivation and sale of fresh hallucinogenic mushrooms, which grow naturally in the wild in several areas.
A total of 186 species of "shrooms" or "paddos" will become illegal from Monday, with more expected to follow later. The dried variety has been illegal in the country for several years.
Klink believes consumption of the fungi, sold in the Netherlands in so-called smart shops, "can lead to unpredictable and risky behaviour".
His ban follows the death in March last year of a French teenager who had taken mushrooms before jumping to her death from an Amsterdam bridge, reigniting a national debate over tolerance of the substance.
But Jaap Jamin of the Jellinek addiction prevention institute said the prohibition made no sense.
"We are not necessarily for the use of paddos, but we are against its banning," he told AFP.
The move would merely force the trade underground where it could no longer be regulated, said Jamin.
"And one can imagine a situation in which people who want it will merely go and pick mushrooms themselves at the risk of consuming poisonous types."
According to Amsterdam health services, where a quarter of the country's smart shops are to be found, more than 90 percent of the 1.5 million to two million doses consumed every year are bought by foreign tourists.
VLOS says there are six growers in the Netherlands, 180 smart shops, and a few hundred employees in an industry with an annual turnover of 15-20 million euros.
Several political parties have become more critical of the Netherlands' traditionally liberal approach on issues such as drugs and prostitution which is seen as a draw for sex tourists.
The Netherlands decriminalised the consumption and possession of under five grams of cannabis in 1976. Its cultivation, however, remains illegal.
The Netherlands hosts a total of 702 so-called coffee shops -- establishments with special licences to sell cannabis.
However the Mayor of Amsterdam said last week he would reluctantly close 43 in his city in accordance with a new law banning cannabis-selling coffee shops situated within a 250-metre (820-feet) radius of schools.
Last week, the southern Dutch city of Maastricht incurred the ire of nearby Belgian towns by opting to move its seven coffee shops closer to the border to dilute the nuisance it claims is caused by drug tourism.
And Roosendaal and Bergen-op-Zoom, two other southern Dutch municipalities close to the Belgian border, have announced they will close their coffee shops from February 1 next year.