The classroom had to be vacated when the girl said her pants were burning after she sat down and heard a pop, principal Jeffrey Rodman was quoted by the New York Daily News as saying.
Rodman said the student quickly raced to the corner and took off her pants.
The student was then treated for minor burns and was expected to return to school soon.
Rodman said the girl's pants had multiple burn holes and there was so much smoke in the room that a window had to be opened.
He said the cause of the phone's explosion is under investigation by the state Fire Marshall.