Prince Joachim was issued with the penalty for failing to observe a 14-day quarantine period after arriving in the country.
The prince, 28, arrived in Spain for an internship on 24 May, but attended a gathering in the southern city of Córdoba two days later.
He has since apologised.
"I deeply regret my actions," the prince said in a statement after reports about the party emerged in Spanish media late last month. He added that he would "accept the consequences".
He has 15 days to pay the fine, in which case the amount will be reduced by half.