Spain also has no border with the Sahara, meaning it would have to build the barrier on foreign land.
The conversation between the two politicians is believed to have taken place when Mr Borrell visited the States with the king and queen of Spain in June.
Trump's call for a wall on the southern border - which he repeatedly insisted that Mexico would pay for - was a hallmark of his presidential campaign, with "Build the Wall!" chants still breaking out at his frequent "MAGA" rallies.
Jack Ma makes a grim prediction about US-China trade war
He added USA tariffs on hundreds of billions of dollars of Chinese products could prompt the country to export elsewhere. Given the relative lack of talks between the two sides, the likelihood of the trade war subsiding anytime soon is slim.
"The border with the Sahara can not be bigger than ours with Mexico", the president reportedly told Mr Borrell.
Mr Borrell told the story at a lunch event in Madrid this week, in comments that were widely reported by the Spanish media.
Since the start of 2018, more than 38,000 migrants have arrived in Spain, mostly by sea.
Borrell told his audience that he wasn't in favour of adopting Italy's hardline stance, but said he was concerned about European societies' capacity to absorb a high number of migrants, "especially if they are Muslims".