The fire service said the child could have been far more seriously injured after his bedding was set alight by the device in the early hours of yesterday.
Two appliances attended the property in Elgin, Moray, and crews with breathing apparatus used a hosereel jet to extinguish the fire. The boy, who had been removed from the room before firefighters arrived, suffered burns to an arm.
The youngster was subsequently treated by paramedics at the scene and taken to hospital for treatment.
Elgin fire station manager Shaun Burns said: "The fire was caused by an overheated mobile phone charger which had been left charging on the bed.
"It had overheated to such an extent that the bedding caught fire and caused burn injuries to the young boy in the room."
He added: "This incident had the potential to be even more serious and we can't stress enough how important it is to unplug mobile chargers before you go to bed.
"We would advise unplugging any such electrical item overnight and even when charging phones or other devices during the day, don't leave them on top of any kind of material or near flammable surfaces."
Scottish Fire and Rescue says anyone seeking fire safety advice can arrange a home visit from their experts. It can be set up by completing an online form, phoning 0800 0731 999 or texting the words "Check" to 61611 from a mobile phone.