Plastic cards the size of credit cards -- a tool of choice for cocaine users -- were handed out by the health department in the northern city of Bilbao.
They bore messages such as: "Cut your line properly... If it is not properly cut, you could damage your nostrils".
The cards were distributed to people singled out as users or potential users during week-long festivities last month, a spokesman for the department told AFP.
"We didn't hand them out to just anyone," he said, adding that each recipient was warned about the dangers of drugs.
News of the controversial campaign emerged this week, sparking criticism from the conservative Popular Party in Bilbao.
The party said it was "real nonsense to hand out a kind of consumption 'kit' with such a flippant and frivolous message."
The city council's health chief, Yolanda Diez, said the advice simply sought to reduce the risks associated with taking cocaine.
A health service spokesman told AFP that around a hundred leaflets had been distributed.
Spain has the highest rate of cocaine consumption in Europe after Britain, according to the EU's 2017 European Drug Report.
The latest figures, compiled for 2015, found 9.1 percent of Spaniards aged 15-64 had used cocaine in their lifetime. Within Europe, only Britain posted a higher rate, at 9.7 percent.