The Pasco County Sheriff's Office said the discovery was made after the phone was confiscated by a teacher at Wireglass Ranch High School who suspected the girl of using it to cheat on a test, the Tampa Tribune reported.
Administrators searching the phone for a picture of the test instead discovered the photo of a 15-year-old boy and a 14-year-old girl engaging in oral sex.
Sheriff's deputies told WTSP-TV, St. Petersburg, the sex photo was sent to other students at Wireglass Ranch and one of those students posted it on his Twitter account.
Wireglass Ranch Principal Robyn White asked parents to monitor their students' phone and Internet activity.
"I also want to remind students that it's not worth it to take images of body parts or activities that could result in criminal charges," said White in an audio message.
Wireglass Ranch High School is in Wesley Chapel, approximately 22 miles north of Tampa.