Alaska State Police spokeswoman Megan Peters said Jonathon Michael Miller, 29, and Stephen Ray Dilley II, 32, were charged with felony assault and reckless endangerment for last week's incident, the Anchorage Daily News reported Wednesday.
The two men allegedly confessed to authorities they were playing with an aerosol sprayer and lighter last Friday when they accidentally set the boy's head on fire.
"It was described to the troopers as an accident," Peters said. "I mean a child, two guys, can of Quick Start, Bic lighter: How could this not go wrong?"
The boy, whose identity was not released, suffered second-degree burns in the incident.
Troopers said Miller, the boyfriend of the boy's mother, was watching the child while she was away for the weekend.
The Daily News said the boy's mother, whose identity was not released, has a restraining order against Dilley, with whom she has a child.
Notable deaths of 2014 [PHOTOS]