Mindkiller is a 1982 novel by science fiction writer
Spider Robinson. The novel, set in the late 1890s, explores the social implications of technologies to manipulate the brain, beginning with
wireheading, the use of electrical current to stimulate the pleasure center of the brain in order to achieve a narcotic high.
See more at Wikipedia.org...