The single-seat aircraft has the wingspan of a jumbo jet but only weighs as much as an average family car, according to its creators.
It has 12,000 solar cells turning four electrical motors, which power the carbon fibre aircraft.
It arrived in the Moroccan capital Rabat after leaving Spain before dawn.
The 1,554 mile journey from Europe to Africa began in May when the plane was flown from Switzerland to Madrid.
The mission has been described as a final dress rehearsal for a round-the-world flight with a new and improved plane in 2014.
People can follow the aircraft’s flight progress via a virtual dashboard on Solar Impulse’s website, which shows the plane’s battery status, altitude and speed.
Pilot Bertrand Piccard posted live updates of his journey on Twitter
In one of his tweets, he said: "More than half way to Gibraltar. Solar energy running engines and loading batteries, great feeling."
Mr Piccard, a former balloonist, and Swiss pilot and businessman Andre Borschberg have worked on the Solar Impulse project for nine years.
The aircraft made history in July 2010 when it became the first manned solar plane to complete a 26-hour non-stop flight, proving that the sun’s energy was enough to keep the plane in the air, even at night.
The US military has had the concept of solar-powered drones under development for some time, with a design expectation of keeping the surveillance craft aloft for months at a time.