The flight was bound for Ibiza from Barcelona when the incident occurred.
The phone battery is thought to be owned by a passenger from New Zealand.
A Ryanair spokesman explained in a statement: “The passengers of a flight from Barcelona to Ibiza were evacuated in an emergency at Barcelona’s El Prat Airport because of a fire in a mobile phone that was being charged with an external battery.
“All the passengers were evacuated from the aircraft in a safe way to the terminal and the cabin crew took charge of the device.
“Ryanair is working to organise a replacement plane to re-accommodate the passengers as fast as possible.”
A passenger caught up in the drama explained: “We were just over 100 feet away from the docking bay when the device exploded and smoke began to come out.
“Fortunately I was in the first row and I opened the emergency door before the pilot activated the chute.”
Passengers were forced to wait at the airport while waiting for another plane and their luggage was removed from the flight.
Apart from friction burns, no passengers were injured or needed medical attention.
Firefighters were not called to the tarmac during the incident.