The teen was a student at Glastonbury high school, where the quote appeared in May beneath the photo of an unsuspecting classmate, police said.
It read, “It is a quite special secret pleasure how the people around us fail to realize what is really happening to them.” The quote was attributed in the yearbook to George Floyd, the black man killed by a Minneapolis police officer last year.
Police said the same student also was responsible for another unauthorized yearbook entry, which referenced one of the Boston Marathon bombers and drug use.
The teen, who was previously barred from attending his graduation ceremony, faces two counts of third-degree computer crime and is due in court on Aug. 6.
The quotes were discovered in May after the school began distributing the yearbooks. The school recalled the yearbooks to remove the offending quotes.
“We deeply regret not having caught the act of bigotry and vandalism before the yearbook was printed,” school administrators said in a statement when the yearbooks were recalled. “We are examining and will revise our yearbook procedures for collecting and reviewing future student submissions.”