Zavier Valencia faces a third-degree felony charge of battery on an education employee and a second-degree charge of disrupting the peace during a school assembly.
According to the arrest report, Palatka High School Principal James Stout was handing out diplomas to graduates when Valencia approached him with a pie in his hand.
Valencia then tried to hit Stout in the face with the pie, but the principal threw his hands up to block his face and the dessert, instead, struck him in the arms, deputies said.