Gabrielle Suzanne Marvelli, a teacher at William Allen High School in Allentown Pennsylvania, was charged with one count of corruption of minors, a first degree misdemeanor.
Prosecutors said Marvelli, 38, of Quakertown, Bucks County, had sex with a 17-year-old male student at a motel in Allentown in late May.
"The victim in this case was, at the time of the alleged incident, only one week away from reaching majority under the law," said Lehigh County District Attorney Jim Martin in a statement. "Had he reached his 18th birthday, this case could not have been brought."
"I have chosen to approve this charge because teachers must be held to a high standard and, stating the obvious, should not enlist their students to engage in sexual relations," Martin's statement continued.
Marvelli's attorney said the student told his client he was 18 at the time of their alleged encounter.
The boy's mother told WFMZ-TV last week that her son later regretted his decision to have sex with Marvelli and decided to come forward and tell his mom about it.
Marvelli was released on $10,000 bail and ordered not to have contact with the student and his family. She is scheduled to be back in court for her formal arraignment on August 17.
Russ Mayo, a deputy superintendent with the Allentown School District, said earlier this week that Marvelli was suspended with pay pending a "full and complete investigation."
Mayo also told Action News earlier this week that Marvelli was suspended from her job when she returned to work the Tuesday after Memorial Day.