Yolanda Moorjaney, 31, who has taught at P.S. 256 in Far Rockaway for six years, was charged with fourth-degree criminal mischief in the incident.
Queens District Attorney Richard A. Brown said a racial epithet discovered on a bathroom stall of the school's third floor rest room.
Moorjaney, who is white, was apprehended when she tried to exit the room, which had been searched before and found to be free of any graffiti.
Authorities had been investigating similar incidents which school officials had been complaining about dating back to Jan. 30.
Brown said Moorjaney used a marking pen to write the epithet on the stall.
"The words were hateful, offensive, and harmful to public order as well as being destructive to property," he said.
Moorjaney was being held by authorities pending arraignment in Queens Criminal Court. If convicted, she faces up to four years in prison.