Josep Borrell said the U.S. president dismissed any doubts expressed by Spanish diplomats, who pointed out that the desert stretched for 3,000 miles.
"The border with the Sahara can not be bigger than our border with Mexico", the President is reported to have said.
The wall was one of Mr Trump's dominant campaign promises, but few believe building it along 2,000 miles of the USA border is realistic or feasible.
The Sahara desert extends for almost 3,000 miles across the African continent.
El Pais and Europa Press reported this week that Borrell recalled Trump's suggestion during a luncheon in Madrid on Tuesday.
Trump famously called for a wall to be built along the US-Mexico border to stop illegal immigration to the US during his 2016 presidential campaign, and now apparently feels it can help Europe as well.More news: Ronaldo weeps after Juventus red card
At a lunch event at Madrid's Club Siglo XXI, Mr Borrell told attendees the exchange had come during his trip to the USA in June, El Pais reported.
Trump's plan for a border wall along the US-Mexico border has encountered many obstacles in US Congress.
The Spanish foreign ministry did not immediately respond to Euronews' requests for comment, however, a spokesperson confirmed to The Guardian that the minister made the remarks.
Many of these cross the Sahara to Morocco and on to Spain across the Mediterranean or over two high fences into the Spanish overseas territories of Ceuta and Melilla in northern Morocco.
Spain is at the frontline of this issue, having overtaken Italy to become the number one point of entry for migrants coming to Europe by sea or by land from Africa.
According to the International Organization for Migration, more that 33,000 people have arrived in Spain via the western Mediterranean in 2018 - three times as many as in the same period a year ago.