Foreign Minister José Manuel García-Margallo made the comparison after the European Union labelled Sunday's referendum in Crimea "illegal" and "illegitimate".
Preliminary counting shows that some 96 percent of voters in the southern region of Ukraine voted to join Russia in the poll.
But García-Margallo restated the EU's line and rejected the vote.
"Nobody can, under International law, recognize the Crimea referendum because it violates the (Ukraine) constitution," he said, speaking to reporters in Brussels.
"A territory which splits off in flagrant violation of an internal constitution can't aspire to international recognition," the minister said.
This was "exactly the same as the rules of the Spanish constitution", he added, in reference to a planned November 9th referendum in Catalonia on the issue of independence for the region.
Catalonia's government announced in late 2013 it planned to hold a referendum on the issue of self-rule for the region with a population of 7.5 million people.
Proud of their distinct language and culture and fed up after five years of stop-start recession, many people in Catalonia want to redraw the map of Spain, saying they feel short-changed by the central government which redistributes their taxes.
But Spain's conservative central government has repeatedly stated the poll will not go ahead, and that an independent Catalonia would have to reapply to join the EU.
"The self-rule vote in Catalonia isn't possible because it violates article 1.2 of the Spanish Constitution which states the right to decide (on independence) is a matter for everyone in Spain and not just a part of the Spanish population," he said.
"Every square centimetre of Spain belongs to all Spaniards…and no political leader can deprive a citizen of Catalonia of the right to be Catalan, Spanish and European," he added.
This was "not about threatening" Catalonia, the minister said. Rather "it's about warning that you shouldn't head out to sea without navigation charts and meteorological information if you want to avoid difficulties on high seas".
Catalonia's Minister of the Presidency and government spokesperson Francesc Homs responded on Tuesday by saying he was "concerned" by the "ridiculous" comparison between the situations in the Crimea and in Catalonia made by García-Margallo.
They have "nothing in common" he said.