masochism

noun
  1. the tendency to derive pleasure from one’s own pain or humiliation
  2. Usage: psychology
  3. behavior that seems to invite suffering or punishment
  4. Usage: informal

Examples