He had also expressed his confidence that Mexico will "eventually" pay for the border wall.
Taking credit for the concept, Mr Trump told supporters: 'Pretty good imagination, right?
US President Donald Trump: "We're thinking about building the wall as a solar wall, so it creates energy, and pays for itself".
He said that the drug trade was largely responsible for Mexico being ranked as the second deadliest country in the world after Syria.
However, back in April when Department of Homeland Security was reviewing bids for the wall project, at least one contractor, Gleason Partners LLC of Las Vegas, submitted a plan to use solar panels to cover sections of the wall.
The U.S. president proposed a "solar wall" would help provide low-cost energy and help pay for itself.
So far, 20 companies have been shortlisted to build the wall for the current administration. The government has selected the finalists for contracts to build wall prototypes in San Diego and is expected to announce the winners soon.
While Trump was declaring an unlikely attachment to large scale solar power, he was also dissing wind energy, telling a crowd in Iowa that the lights might go out in a state that sources 33 per cent of its power from wind energy.
Trump's first full-year budget, released in May, proposes a US$1.6 billion (NZ$2.2 billion) downpayment for new and replacement sections of a border wall.
In the statement, the foreign ministry described illicit drug trade as a common problem for both the US and Mexico.
Trump apparently referred to a report by the London-based International Institute for Strategic Studies. Among countries the authors considered to be in armed conflict, only Syria had a higher death toll.
Gleason said he has no problem with Trump claiming credit for the idea. "Good? My idea." He added: "I think we could make it look attractive, too", he added.
Edward Alden of the Council of Foreign Relations said a solar array would be better than just a barricade, but "the long distances between the border and the places where the power is needed would likely make it uneconomical".