To frame a person is to provide a false basis or false evidience that the person is guilty of wrongdoing.
In spanking stories
In many spanking stories the element of an unfair punishment is provided when one character frames another. Classically the frame is discovered, and the framer is punished in turn, often more severely than the original victim. An example is in the Victorian spanking novel The Mysteries of Verbena House (1881).