The term "masochism" is named after the author, Leopold von Sacher-Masoch who wrote during the 19th century. As a child, he unintentionally witnessed a sadomasochist event between a count and a countess. This inspired his later work, Venus in Furs, where his main male character desires his lover to treat him like a slave.
Sadism was named after the controversial author Marquis de Sade of the late 18th century. He had a record of violent sexual encounters and was placed in prison for sexual crimes. After he was released from prison he wrote Justine, an erotic novel that follows a young woman and her submission during sexual encounters. The movie "Quills" is based on the Marquis' life.