Barcelona City Hall ordered the closures after an inspection of 145 cannabis clubs found a number with "deficiencies in their functioning and problems of coexistence with neighbours", it said in a statement.
Authorities accused the clubs selling cannabis illegally and attempting to lure tourists to their premises.
Dealing in cannabis is illegal in Spain but the law does not prohibit growing it for private consumption. It also allows the existence of smokers' associations or cannabis clubs.
Club members pay an annual subscription fee plus a variable fee to cover the cost of producing the cannabis they consume.
A cannabis club is legal as long as it controls consumption and refrains from advertising and distributing the drug for profit.
Smokers' groups say some 700 such associations have sprung up in Spain due to a legal loophole.
Some clubs are suspected of stepping over the line, however, venturing beyond their non-profit association activities into full-blown drug-dealing.
Half of Spain's cannabis clubs are in Barcelona, which tops the rankings on WeBeHigh, a travel advice website for soft drug users, beating Amsterdam.
Local authorities, concerned by their growth, imposed a moratorium last year on associations opening premises for smoking the drug.
Following the closures on Wednesday, the Catalan federation of cannabis associations, CatFAC, appealed for dialogue between the authorities and the clubs.
"We are aware that the administration does its job well and ensures the common good but this situation would be easier if, before it acts, it set clear rules for all cannabis associations," it said in a statement.