A Scanner Darkly is one of Philip K. Dick's darkest novels, and with good reason. The story follows Robert Arctor, an undercover narcotics agent pretending to be a drug addict, but who has actually become an addict himself. This novel follows his mental breakdown as a result of the drug, creating a dark world full of suspicion, conspiracies, backstabbing, and paranoia, all of which is only vaguely hinted at but which dominates the mood of the book.
Arctor seems to be a reasonably well-put-together guy at the beginning of the book, but that quickly changes. The government agency doesn't actually know his real identity, as he wears a scramble suit and goes by the name "Fred." As a result of some anonymous phone calls, they assign Fred to watch Bob Arctor despite the slim possibility that he himself is Arctor (which, of course, he is). Fred therefore surveils the house, watching Bob go about his daily routine and interact with his housemates. By this time, the drug's effects on Arctor's mind have become profound, causing a split between the hemispheres of his brain and thus between his two personalities, Fred and Bob. This schism eventually becomes so large that Fred is declared to be mentally incompetent and released from his job, being placed in a New Path rehab facility.
This horrible depiction of the effects of drugs on the human mind is unfortunately all too personal for Philip K. Dick, who was an addict and substance abuser for a large portion of his life. Many of his strangest and most appealing ideas came from such highs, but the habit also sucked away most of his income and had a large part in ruining his life - after his wife left him, he opened his large home as a house for drug users, drastically increasing his exposure to the stuff. A Scanner Darkly is his warning message: 'don't do drugs, or else this could happen to you - it's starting to happen to me already.' Unfortunately, by this time the effects were already beginning to snowball; later in his life, having clearly developed some mental disconnects, PKD's work grew steadily crazier and more religiously and philosophically radical, and the nature of the VALIS trilogy (along with his epic posthumous work The Exegesis of Philip K. Dick) proves that he was a bit insane by the time of his death, making this book's message all the more weighty.
The title of A Scanner Darkly is derived from 1 Corinthians 13:12, which says, "For now we see through a glass, darkly; but then face to face: now I know in part; but then shall I know even as also I am known" (KJV). In this Scriptural passage, Paul is making an argument about the nature of truth and perception in this physical, fallen world: since our judgment is clouded by bias, subjectivity, and the finite, fallible nature of human cognition, we "see" truth in the same reflected, removed, and somewhat distorted way as one might see another person through a dim reflection in a glass. When we reach heaven, however, these barriers will be removed, and we will see Truth as if 'face to face.' The message of PKD's novel is slightly different, but still within the same vein of philosophy. Arctor is worried that these high-tech scanners, despite having complete objective knowledge, can't truly know him in any meaningful sense of the word. As he can't know himself because of the limits of his mind, he's worried that there is no way to achieve true self-knowledge, only a futile reductionism that will result in foolish conclusions.
This is a dark, complex, essentially philosophical novel, and it's rightly considered one of the classics of science fiction. By examining a practical scenario of addiction in a future where technology is even more advanced, PKD makes an ageless philosophical question seem again relevant while presenting a strong case against the abuse of illegal substances.