
King Felipe of Spain had been due to hold a reception for Zelensky on May 17 and host a meal in his honour.
Zelensky had also been expected to sign a bilateral security cooperation agreement with Prime Minister Pedro Sanchez following a joint declaration by Nato last year.
A spokesman for the Portuguese government said the Ukraine president had cancelled the visit but did not give a reason.
Spanish government sources said they had been informed officially that Zelensky would not come to Spain this week.
Alongside other European Union countries, Spain committed to support Ukraine with financial and military aid after Russia’s invasion in February 2022.
Zelensky’s planned visit was due to coincide with a European Union pledge of long-term security support for Kyiv, according to a draft document.