According to the high court, the gift violated the constitution, which states an item of cultural importance cannot be given away.
It ordered the foreign ministry to undertake all necessary negotiations to bring back the pre-Colombian artifacts from the South American Quimbaya civilization, known for their gold work.
In 1893, President Carlos Holguin gifted the pieces -- part of a collection of over 400 including masks and human figures -- to Spain's queen regent Maria Cristina de Habsburgo-Lorena.
"Holguin gifted the treasure to the queen of Spain, as she had helped him with a boundary dispute we had with Venezuela," Jaime Lopera, of the Quindio Academy of History, in the western region of Colombia where the Quimbaya lived.
"He should not have given away that treasure, since it was bought with the nation's money and belonged to the national heritage," added the historian, who played a part in a campaign to recover the artifacts lasting over a decade.
The Colombian government did not immediately respond to the decision.