The injured girl was riding the the Hogwarts Express train with her family, who were on holiday from Tennessee visiting Universal Studios in Orlando.
Police described the explosion as a "fireball", burning the girl's face.
"It was just a weird, freak accident," Lieutenant Dan Brady told the Orlando Sentinel.
"It wasn't a big explosion but was definitely enough to scare everyone who was in that cab of the train," he added.
Her name has not been released.
The girl was riding the train, which connects Universal Studios with the Island of Adventure theme park, at about 15:30 local time (19:30 GMT) on Saturday when the device exploded.
The girl suffered mild burns to her face, arm, and leg, and was taken to hospital.
The vapouriser was inside another man's pocket when it malfunctioned, causing minor burns to his leg.
The explosion burned a hole in a seat, but otherwise there was no significant damage to the train, officials say.
Universal Studios shut down the ride temporarily to allow detectives to investigate.
The Wizarding World of Harry Potter opened at Universal Studios in 2010.
A 14-year-old girl suffered burns on a Harry Potter ride when another passenger's electronic cigarette exploded, police in Florida say.